-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from slapers/fix/remap-codes
Update of Loxone code + remapping of the weather codes from tomorrow.io
- Loading branch information
Showing
2 changed files
with
83 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,63 @@ | ||
package main | ||
|
||
// https://github.com/sarnau/Inside-The-Loxone-Miniserver/blob/master/Code/LoxoneWeather.py | ||
// | ||
// 1 Clear, cloudless sky (Loxone: Wolkenlos) | ||
// 2 Clear, few cirrus (Loxone: Wolkenlos) | ||
// 3 Clear with cirrus (Loxone: Heiter) | ||
// 4 Clear with few low clouds (Loxone: Heiter) | ||
// 5 Clear with few low clouds and few cirrus (Loxone: Heiter) | ||
// 6 Clear with few low clouds and cirrus (Loxone: Heiter) | ||
// 7 Partly cloudy (Loxone: Heiter) | ||
// 8 Partly cloudy and few cirrus (Loxone: Heiter) | ||
// 9 Partly cloudy and cirrus (Loxone: Wolkig) | ||
// | ||
// 10 Mixed with some thunderstorm clouds possible (Loxone: Wolkig) | ||
// 11 Mixed with few cirrus with some thunderstorm clouds possible (Loxone: Wolkig) | ||
// 12 Mixed with cirrus and some thunderstorm clouds possible (Loxone: Wolkig) | ||
// 13 Clear but hazy (Loxone: Wolkenlos) | ||
// 14 Clear but hazy with few cirrus (Loxone: Heiter) | ||
// 15 Clear but hazy with cirrus (Loxone: Heiter) | ||
// 16 Fog/low stratus clouds (Loxone: Nebel) | ||
// 17 Fog/low stratus clouds with few cirrus (Loxone: Nebel) | ||
// 18 Fog/low stratus clouds with cirrus (Loxone: Nebel) | ||
// 19 Mostly cloudy (Loxone: Stark bewölkt) | ||
// 20 Mostly cloudy and few cirrus (Loxone: Stark bewölkt) | ||
// 21 Mostly cloudy and cirrus (Loxone: Stark bewölkt) | ||
// 22 Overcast (Loxone: Bedeckt) | ||
// 23 Overcast with rain (Loxone: Regen) | ||
// 24 Overcast with snow (Loxone: Schneefall) | ||
// 25 Overcast with heavy rain (Loxone: Starker Regen) | ||
// 26 Overcast with heavy snow (Loxone: Starker Schneefall) | ||
// 27 Rain, thunderstorms likely (Loxone: Kräftiges Gewitter) | ||
// 28 Light rain, thunderstorms likely (Loxone: Gewitter) | ||
// 29 Storm with heavy snow (Loxone: Starker Schneeschauer) | ||
// 30 Heavy rain, thunderstorms likely (Loxone: Kräftiges Gewitter) | ||
// 31 Mixed with showers (Loxone: Leichter Regenschauer) | ||
// 32 Mixed with snow showers (Loxone: Leichter Schneeschauer) | ||
// 33 Overcast with light rain (Loxone: Leichter Regen) | ||
// 34 Overcast with light snow (Loxone: Leichter Schneeschauer) | ||
// 35 Overcast with mixture of snow and rain (Loxone: Schneeregen) | ||
// https://www.loxone.com/enen/kb/weather-service/ | ||
|
||
// 1 = Clear | ||
// 2 = Bright | ||
// 3 = Cloudy | ||
// 4 = Very cloudy | ||
// 5 = Overcast | ||
// 6 = Fog | ||
// 7 = Low Fog | ||
// 8 = Not used | ||
// 9 = Not used | ||
// 10 = Light rain | ||
// 11 = Rain | ||
// 12 = Heavy rain | ||
// 13 = Drizzle | ||
// 14 = Light freezing rain | ||
// 15 = Heavy freezing rain | ||
// 16 = Light rain showers | ||
// 17 = Heavy rain showers | ||
// 18 = Thunderstorm | ||
// 19 = Heavy thunderstorm | ||
// 20 = Light snow | ||
// 21 = Snow | ||
// 22 = Heavy snow | ||
// 23 = Light snow showers | ||
// 24 = Strong snow showers | ||
// 25 = Light sleet | ||
// 26 = Sleet | ||
// 27 = Heavy sleet | ||
// 28 = Light sleet showers | ||
// 29 = Heavy sleet showers | ||
|
||
const ( | ||
ClearSky = 1 | ||
ClearFewCirrus = 2 | ||
ClearWithCirrus = 3 | ||
ClearWithFewLowClouds = 4 | ||
ClearWithFewLowCloudsAndFewCirrus = 5 | ||
ClearWithFewLowCloudsAndCirrus = 6 | ||
PartlyCloudy = 7 | ||
PartlyCloudyAndFewCirrus = 8 | ||
PartlyCloudyAndCirrus = 9 | ||
MixedWithSomeThunderstormClouds = 10 | ||
MixedWithFewCirrusAndThunderstorm = 11 | ||
MixedWithCirrusAndThunderstorm = 12 | ||
ClearButHazy = 13 | ||
ClearButHazyWithFewCirrus = 14 | ||
ClearButHazyWithCirrus = 15 | ||
FogLowStratusClouds = 16 | ||
FogLowStratusCloudsWithFewCirrus = 17 | ||
FogLowStratusCloudsWithCirrus = 18 | ||
MostlyCloudy = 19 | ||
MostlyCloudyAndFewCirrus = 20 | ||
MostlyCloudyAndCirrus = 21 | ||
Overcast = 22 | ||
OvercastWithRain = 23 | ||
OvercastWithSnow = 24 | ||
OvercastWithHeavyRain = 25 | ||
OvercastWithHeavySnow = 26 | ||
RainThunderstormsLikely = 27 | ||
LightRainThunderstormsLikely = 28 | ||
StormWithHeavySnow = 29 | ||
HeavyRainThunderstormsLikely = 30 | ||
MixedWithShowers = 31 | ||
MixedWithSnowShowers = 32 | ||
OvercastWithLightRain = 33 | ||
OvercastWithLightSnow = 34 | ||
OvercastWithMixtureOfSnowAndRain = 35 | ||
Clear = 1 | ||
Bright = 2 | ||
Cloudy = 3 | ||
VeryCloudy = 4 | ||
Overcast = 5 | ||
Fog = 6 | ||
LowFog = 7 | ||
LightRain = 10 | ||
Rain = 11 | ||
HeavyRain = 12 | ||
Drizzle = 13 | ||
LightFreezingRain = 14 | ||
HeavyFreezingRain = 15 | ||
LightRainShowers = 16 | ||
HeavyRainShowers = 17 | ||
Thunderstorm = 18 | ||
HeavyThunderstorm = 19 | ||
LightSnow = 20 | ||
Snow = 21 | ||
HeavySnow = 22 | ||
LightSnowShowers = 23 | ||
StrongSnowShowers = 24 | ||
LightSleet = 25 | ||
Sleet = 26 | ||
HeavySleet = 27 | ||
LightSleetShowers = 28 | ||
HeavySleetShowers = 29 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters