patch-uninitializedValue #24

Merged
marko merged 2 commits from patch-uninitializedValue into dev 2023-01-05 18:41:29 +00:00
2 changed files with 6 additions and 4 deletions

View File

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

View File

@ -723,8 +723,10 @@ sub _FillSelfHashWithWeatherResponseForOnecallCurrent {
'wind_speed' => int(
sprintf( "%.1f", ( $data->{current}->{wind_speed} * 3.6 ) ) + 0.5
),
'wind_gust' => int(
sprintf( "%.1f", ( $data->{current}->{wind_gust} * 3.6 ) ) + 0.5
'wind_gust' => (
$data->{current}->{wind_gust} ? int(
sprintf( "%.1f", ( $data->{current}->{wind_gust} * 3.6 ) ) + 0.5
) : 0
),
'wind_direction' => $data->{current}->{wind_deg},
'rain_1h' => ( $data->{rain}->{'1h'} ? $data->{rain}->{'1h'} : 0 ),