Merge pull request 'patch-uninitializedValue' (#24) from patch-uninitializedValue into dev

Reviewed-on: #24
This commit is contained in:
Marko Oldenburg 2023-01-05 19:41:28 +01:00
commit 6a665c433c
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-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 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( 'wind_speed' => int(
sprintf( "%.1f", ( $data->{current}->{wind_speed} * 3.6 ) ) + 0.5 sprintf( "%.1f", ( $data->{current}->{wind_speed} * 3.6 ) ) + 0.5
), ),
'wind_gust' => int( 'wind_gust' => (
$data->{current}->{wind_gust} ? int(
sprintf( "%.1f", ( $data->{current}->{wind_gust} * 3.6 ) ) + 0.5 sprintf( "%.1f", ( $data->{current}->{wind_gust} * 3.6 ) ) + 0.5
) : 0
), ),
'wind_direction' => $data->{current}->{wind_deg}, 'wind_direction' => $data->{current}->{wind_deg},
'rain_1h' => ( $data->{rain}->{'1h'} ? $data->{rain}->{'1h'} : 0 ), 'rain_1h' => ( $data->{rain}->{'1h'} ? $data->{rain}->{'1h'} : 0 ),