From e237018aade40b58accf6951f6e5d72480e25415 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Sun, 8 Jan 2023 16:21:40 +0100 Subject: [PATCH 1/2] fix: wrong snow hour assignment --- controls_Weather.txt | 8 ++++---- lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm | 13 +++++++++++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/controls_Weather.txt b/controls_Weather.txt index a4ed2a8..218da80 100644 --- a/controls_Weather.txt +++ b/controls_Weather.txt @@ -1,4 +1,4 @@ -UPD 2023-01-07_13:28:16 57768 FHEM/59_Weather.pm -UPD 2023-01-07_13:28:44 49884 lib/FHEM/APIs/Weather/DarkSkyAPI.pm -UPD 2023-01-07_13:28:59 33258 lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm -UPD 2023-01-07_13:29:12 36090 lib/FHEM/APIs/Weather/wundergroundAPI.pm +UPD 2023-01-07_19:00:05 57768 FHEM/59_Weather.pm +UPD 2023-01-07_19:00:05 49884 lib/FHEM/APIs/Weather/DarkSkyAPI.pm +UPD 2023-01-08_16:19:39 33436 lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm +UPD 2023-01-07_19:00:05 36090 lib/FHEM/APIs/Weather/wundergroundAPI.pm diff --git a/lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm b/lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm index 838780c..5a237fb 100644 --- a/lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm +++ b/lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm @@ -688,7 +688,7 @@ sub _FillSelfHashWithWeatherResponseForForecastHourly { ), 'snow3h' => ( $data->{list}->[$i]->{snow}->{'3h'} - ? $data->{list}->[$i]->{snow}->{'1h'} + ? $data->{list}->[$i]->{snow}->{'3h'} : 0 ), } @@ -1024,6 +1024,14 @@ sub _strftimeWrapper { "abstract": "Wetter API für OpenWeatherMap" } }, + "keywords": [ + "fhem-mod-device", + "fhem-core", + "Weather", + "API" + ], + "release_status": "stable", + "license": "GPL_2", "version": "v3.2.5", "author": [ "Marko Oldenburg " @@ -1037,8 +1045,9 @@ sub _strftimeWrapper { "prereqs": { "runtime": { "requires": { + "FHEM": 5.00918799, + "HttpUtils": 5.023, "FHEM::Meta": 0, - "HttpUtils": 0, "strict": 0, "warnings": 0, "constant": 0, -- 2.47.2 From cef2455448a672d2de014152cea4cb2bfa345c15 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Sun, 8 Jan 2023 16:52:11 +0100 Subject: [PATCH 2/2] fix: #30 Use of uninitialized value in OpenWeatherMapAPI.pm line 981 --- controls_Weather.txt | 2 +- lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/controls_Weather.txt b/controls_Weather.txt index 218da80..3212ffd 100644 --- a/controls_Weather.txt +++ b/controls_Weather.txt @@ -1,4 +1,4 @@ UPD 2023-01-07_19:00:05 57768 FHEM/59_Weather.pm UPD 2023-01-07_19:00:05 49884 lib/FHEM/APIs/Weather/DarkSkyAPI.pm -UPD 2023-01-08_16:19:39 33436 lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm +UPD 2023-01-08_16:45:16 33368 lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm UPD 2023-01-07_19:00:05 36090 lib/FHEM/APIs/Weather/wundergroundAPI.pm diff --git a/lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm b/lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm index 5a237fb..4f216e5 100644 --- a/lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm +++ b/lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm @@ -977,9 +977,8 @@ sub _CreateForecastRef { { lat => $self->{lat}, long => $self->{long}, - apiMaintainer => 'Marko Oldenburg (' - . $META->{x_fhem_maintainer}[0] . ')', - apiVersion => version->parse( __PACKAGE__->VERSION() )->normal, + apiMaintainer => $META->{author}[0], + apiVersion => version->parse( __PACKAGE__->VERSION() )->normal, } ); @@ -1026,7 +1025,6 @@ sub _strftimeWrapper { }, "keywords": [ "fhem-mod-device", - "fhem-core", "Weather", "API" ], -- 2.47.2