From e84d810e393df7c7e56ad240bfaa63cff75d7783 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Thu, 16 Oct 2025 19:01:00 +0200 Subject: [PATCH] Update version to 2.3.1 and fix conditionals in Weather.pm This commit updates the version number in the FHEM weather module from 2.3.0 to 2.3.1 to reflect the latest changes. In addition to the version bump, several conditionals in lib/FHEM/Core/Weather.pm have been corrected. Specifically, the syntax for checking the command attributes has been fixed to ensure proper evaluation of the conditions. These changes improve code clarity and correctness, which helps in maintaining the module. There are no breaking changes in this commit, and existing functionality remains intact. --- FHEM/59_Weather.pm | 2 +- controls_Weather.txt | 6 +++--- lib/FHEM/Core/Weather.pm | 7 ++----- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/FHEM/59_Weather.pm b/FHEM/59_Weather.pm index 6a1ab45..96068ad 100755 --- a/FHEM/59_Weather.pm +++ b/FHEM/59_Weather.pm @@ -516,7 +516,7 @@ __END__ ], "release_status": "stable", "license": "GPL_2", - "version": "v2.3.0", + "version": "v2.3.1", "author": [ "Marko Oldenburg " ], diff --git a/controls_Weather.txt b/controls_Weather.txt index b20fe7e..2b23a5a 100644 --- a/controls_Weather.txt +++ b/controls_Weather.txt @@ -1,4 +1,4 @@ -UPD 2025-10-14_07:34:42 24515 FHEM/59_Weather.pm -UPD 2025-10-14_07:20:30 34175 lib/FHEM/Core/Weather.pm -UPD 2025-10-14_07:25:36 33545 lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm +UPD 2025-10-16_18:59:55 24515 FHEM/59_Weather.pm +UPD 2025-10-16_18:59:41 34158 lib/FHEM/Core/Weather.pm +UPD 2025-10-14_07:39:57 33545 lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm UPD 2025-10-14_07:20:30 38721 lib/FHEM/APIs/Weather/wundergroundAPI.pm diff --git a/lib/FHEM/Core/Weather.pm b/lib/FHEM/Core/Weather.pm index 8c09d2b..28e975a 100644 --- a/lib/FHEM/Core/Weather.pm +++ b/lib/FHEM/Core/Weather.pm @@ -232,9 +232,6 @@ sub _LanguageInitialize { @directions_txt_i18n = @directions_txt_nl; %pressure_trend_txt_i18n = %pressure_trend_txt_nl; %status_items_txt_i18n = %status_items_txt_nl; - } - elsif ( $lang eq 'fr' ) { - } elsif ( $lang eq 'fr' ) { %wdays_txt_i18n = %wdays_txt_fr; @@ -870,11 +867,11 @@ sub Attr { ::InternalTimer( gettimeofday() + 0.5, \&FHEM::Core::Weather::DeleteForecastreadings, $hash ); } - elsif ('forecastLimit') { + elsif ( $cmd eq 'forecastLimit' ) { ::InternalTimer( gettimeofday() + 0.5, \&FHEM::Core::Weather::DeleteForecastreadings, $hash ); } - elsif ('alerts') { + elsif ( $cmd eq 'alerts' ) { if ( $cmd eq 'set' ) { $hash->{fhem}->{api}->setAlerts($AttrVal); }