patch-specials #10

Merged
marko merged 10 commits from patch-specials into dev 2022-12-30 11:12:17 +00:00
Showing only changes of commit df08ffb7c4 - Show all commits

View File

@ -585,8 +585,6 @@ sub _FillSelfHashWithWeatherResponseForWeatherCurrent {
int( sprintf( "%.1f", ( $data->{wind}->{speed} * 3.6 ) ) + 0.5 ), int( sprintf( "%.1f", ( $data->{wind}->{speed} * 3.6 ) ) + 0.5 ),
'wind_speed' => 'wind_speed' =>
int( sprintf( "%.1f", ( $data->{wind}->{speed} * 3.6 ) ) + 0.5 ), int( sprintf( "%.1f", ( $data->{wind}->{speed} * 3.6 ) ) + 0.5 ),
'wind_gust' =>
int( sprintf( "%.1f", ( $data->{wind}->{gust} * 3.6 ) ) + 0.5 ),
'wind_direction' => $data->{wind}->{deg}, 'wind_direction' => $data->{wind}->{deg},
'cloudCover' => $data->{clouds}->{all}, 'cloudCover' => $data->{clouds}->{all},
'code' => $codes{ $data->{weather}->[0]->{id} }, 'code' => $codes{ $data->{weather}->[0]->{id} },
@ -606,6 +604,9 @@ sub _FillSelfHashWithWeatherResponseForWeatherCurrent {
$self->{cached}->{current}->{'visibility'} = $self->{cached}->{current}->{'visibility'} =
int( sprintf( "%.1f", $data->{visibility} ) + 0.5 ) int( sprintf( "%.1f", $data->{visibility} ) + 0.5 )
if ( exists $data->{visibility} ); if ( exists $data->{visibility} );
$self->{cached}->{current}->{'wind_gust'} =
int( sprintf( "%.1f", ( $data->{wind}->{gust} * 3.6 ) ) + 0.5 )
if ( exists $data->{wind}->{gust} );
return $self; return $self;
} }