testing #29

Merged
marko merged 73 commits from testing into main 2023-01-07 12:49:01 +00:00
2 changed files with 47 additions and 17 deletions
Showing only changes of commit acdd256e01 - Show all commits

View File

@ -1,4 +1,4 @@
UPD 2023-01-05_08:17:10 55320 FHEM/59_Weather.pm
UPD 2023-01-05_08:20:31 55320 FHEM/59_Weather.pm
UPD 2023-01-04_16:37:24 49883 lib/FHEM/APIs/Weather/DarkSkyAPI.pm
UPD 2023-01-05_08:05:28 32255 lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm
UPD 2023-01-05_17:01:28 33191 lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm
UPD 2023-01-04_16:37:24 36090 lib/FHEM/APIs/Weather/wundergroundAPI.pm

View File

@ -671,10 +671,26 @@ sub _FillSelfHashWithWeatherResponseForForecastHourly {
'cloudCover' => $data->{list}->[$i]->{clouds}->{all},
'code' => $codes{ $data->{list}->[$i]->{weather}->[0]->{id} },
'iconAPI' => $data->{list}->[$i]->{weather}->[0]->{icon},
'rain1h' => $data->{list}->[$i]->{rain}->{'1h'},
'rain3h' => $data->{list}->[$i]->{rain}->{'3h'},
'snow1h' => $data->{list}->[$i]->{snow}->{'1h'},
'snow3h' => $data->{list}->[$i]->{snow}->{'3h'},
'rain1h' => (
$data->{list}->[$i]->{rain}->{'1h'}
? $data->{list}->[$i]->{rain}->{'1h'}
: 0
),
'rain3h' => (
$data->{list}->[$i]->{rain}->{'3h'}
? $data->{list}->[$i]->{rain}->{'3h'}
: 0
),
'snow1h' => (
$data->{list}->[$i]->{snow}->{'1h'}
? $data->{list}->[$i]->{snow}->{'1h'}
: 0
),
'snow3h' => (
$data->{list}->[$i]->{snow}->{'3h'}
? $data->{list}->[$i]->{snow}->{'1h'}
: 0
),
}
);
@ -711,7 +727,7 @@ sub _FillSelfHashWithWeatherResponseForOnecallCurrent {
sprintf( "%.1f", ( $data->{current}->{wind_gust} * 3.6 ) ) + 0.5
),
'wind_direction' => $data->{current}->{wind_deg},
'rain_1h' => $data->{rain}->{'1h'},
'rain_1h' => ( $data->{rain}->{'1h'} ? $data->{rain}->{'1h'} : 0 ),
'cloudCover' => $data->{current}->{clouds},
'code' => $codes{ $data->{current}->{weather}->[0]->{id} },
'iconAPI' => $data->{current}->{weather}->[0]->{icon},
@ -836,8 +852,14 @@ sub _FillSelfHashWithWeatherResponseForOnecallDaily {
),
'cloudCover' => $data->{daily}->[$i]->{clouds},
'code' => $codes{ $data->{daily}->[$i]->{weather}->[0]->{id} },
'rain' => $data->{daily}->[$i]->{rain},
'snow' => $data->{daily}->[$i]->{snow},
'rain' => (
$data->{daily}->[$i]->{rain} ? $data->{daily}->[$i]->{rain}
: 0
),
'snow' => (
$data->{daily}->[$i]->{snow} ? $data->{daily}->[$i]->{snow}
: 0
),
'uvi' => $data->{daily}->[$i]->{uvi},
},
);
@ -897,8 +919,16 @@ sub _FillSelfHashWithWeatherResponseForOnecallHourly {
'cloudCover' => $data->{hourly}->[$i]->{clouds},
'code' => $codes{ $data->{hourly}->[$i]->{weather}->[0]->{id} },
'iconAPI' => $data->{hourly}->[$i]->{weather}->[0]->{icon},
'rain1h' => $data->{hourly}->[$i]->{rain}->{'1h'},
'snow1h' => $data->{hourly}->[$i]->{snow}->{'1h'},
'rain1h' => (
$data->{hourly}->[$i]->{rain}->{'1h'}
? $data->{hourly}->[$i]->{rain}->{'1h'}
: 0
),
'snow1h' => (
$data->{hourly}->[$i]->{snow}->{'1h'}
? $data->{hourly}->[$i]->{snow}->{'1h'}
: 0
),
'uvi' => $data->{hourly}->[$i]->{uvi},
'visibility' => int(
sprintf( "%.1f", $data->{hourly}->[$i]->{visibility} ) + 0.5