Refactor language initialization and attribute handling

Improved the language initialization logic by replacing
the experimental `given/when` construct with a more
standard `if/elsif` structure. This change enhances code
readability and maintainability, making it easier to follow
the flow of language assignments.

Additionally, refactored attribute handling in the `Attr`
subroutine by streamlining the conditions, removing
unnecessary `given/when` usage, and maintaining clarity
in the logic for setting and deleting forecasts and alerts.
These changes help reduce complexity and improve
consistency throughout the codebase.
This commit is contained in:
2025-10-14 06:53:44 +02:00
parent 2db8db3b89
commit 2e3210c438
2 changed files with 60 additions and 67 deletions

View File

@@ -1,4 +1,4 @@
UPD 2025-02-05_05:56:41 25899 FHEM/59_Weather.pm
UPD 2025-02-04_21:08:26 34419 lib/FHEM/Core/Weather.pm
UPD 2025-10-14_06:51:10 34175 lib/FHEM/Core/Weather.pm
UPD 2025-02-05_06:38:34 33780 lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm
UPD 2025-02-04_21:08:26 38751 lib/FHEM/APIs/Weather/wundergroundAPI.pm