Commit Graph

35 Commits

Author SHA1 Message Date
75f92aece3 Remove DarkSky API support from Weather module
The DarkSky API support has been removed from the Weather module documentation,
including its references in both English and German sections. The API
documentation has been updated to exclusively focus on the
OpenWeatherMap API.

The changes made to `59_Weather.pm` include:

- Deleted mentions of the DarkSky API in the documentation.
- Updated example command snippets to reference the
  OpenWeatherMap API.
- Version number has been incremented from v2.2.35 to v2.3.0.

In addition, the version number for the OpenWeatherMap API support
has been updated from v3.2.7 to v3.2.8 in the corresponding API file.

These updates were necessary to streamline the module's
functionality and align it with current API availability, as
DarkSky has been discontinued. There are no breaking changes
for existing users of the OpenWeatherMap API.
2025-10-14 07:35:18 +02:00
f37a24673c Refactor language handling in Weather API
Improved the language initialization logic by replacing the
experimental `given/when` construct with a more standard
`if/elsif` structure, enhancing code readability and
maintainability. The attribute handling in the `Attr` subroutine
was also refactored for clarity, removing unnecessary usage
of `given/when`, which helps reduce complexity throughout
the codebase.

In the OpenWeatherMapAPI module, the logic for handling
weather response data was streamlined by removing `given/when`
statements in favor of `if` conditions. This change avoids
potential confusion and enhances the clarity of the code logic.
No breaking changes were introduced; the overall functionality
remains intact.
2025-10-14 07:03:38 +02:00
d313cb8d4a Refactor language handling to improve readability
Improved the language initialization logic by replacing the
experimental `given/when` construct with a more standard
`if/elsif` structure, enhancing code readability and
maintainability. Additionally, the attribute handling in the
`Attr` subroutine was refactored for clarity, removing
unnecessary usage of `given/when`, which helps reduce
complexity across the codebase.

Furthermore, in the OpenWeatherMapAPI module, logic for
handling weather response data was streamlined by removing
the `given/when` statements in favor of `if` conditions.
This change eliminates potential confusion and enhances
the clarity of the code logic. No breaking changes were
introduced; the overall functionality remains intact.
2025-10-14 07:01:07 +02:00
2e3210c438 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.
2025-10-14 06:53:44 +02:00
2b96be4e6e feat: remove DarkSky, change versions
remove DarkSkyAPI, no longer supported
change Copyright years and versions of OWM API

[Ticket: no]
2025-02-04 21:01:17 +01:00
478c4a3159 fix: apply patch from stefanru
https://forum.fhem.de/index.php?msg=1332884

[Ticket: no]
2025-02-04 20:52:52 +01:00
ce875a8beb docs: change versions and add copyright 2024-10-11 12:04:07 +02:00
b1de4b52da fix: Update forecast with cachemaxage after API calls are down.
special thanks to stefanru (forum)

[Ticket: no]
2024-10-11 06:59:53 +02:00
2a06821252 feat: new reading owmAPICode for original code
[Ticket: no]
2023-07-11 14:10:13 +02:00
5bfd1c49d9 feat: add human-readable text of daily forecast
add the proper human-readable text description of the daily forecast

[Ticket: no]
2023-06-06 08:35:06 +02:00
1683fab2d4 add temperatur reading and fix weblink 2023-05-23 08:08:42 +02:00
30dd03cbea fix: missing perl modules 2023-02-05 09:26:04 +01:00
5f611555e3 fix: failed then Readonly is missing 2023-02-05 09:20:20 +01:00
2601a42643 fix: : Undefined subroutine
&FHEM::Core::Weather::DeleteForecastreadings

[Ticket: #46]
2023-02-02 22:58:40 +01:00
62df910faa revert: mod packages
- packages Weather.pm
- split FHEM/59_Weather.pm in two files and packages (FEHM/59_Weather.pm
and FHEM/Core/Weather.pm

[optional body]

[Ticket: no]
2023-01-10 21:32:56 +01:00
eeea03d2df fix: #40
Undefined subroutine &FHEM::APIs::Weather::DarkSkyAPI::__strftimeWrapper
2023-01-10 16:09:53 +01:00
a330aec9d7 docs: new versions 2023-01-08 17:11:03 +01:00
f8b12ba1a7 fix: #31
Use of uninitialized value in DarkSkyAPI.pm line 730
2023-01-08 17:05:11 +01:00
cef2455448 fix: #30
Use of uninitialized value in OpenWeatherMapAPI.pm line 981
2023-01-08 16:52:11 +01:00
e237018aad fix: wrong snow hour assignment 2023-01-08 16:21:40 +01:00
f3d621a88f style: change version
change version numbers
2023-01-07 13:33:17 +01:00
dc5a675442 fix uninitialized value in multiplication
when wind_guest not given
2023-01-05 19:40:21 +01:00
0b7f3a6a1b change old snow and rain value to zero 2023-01-05 17:02:46 +01:00
785f9d07b4 add hook example
add support for onecall endpoint with api version 2.5
2023-01-05 08:18:05 +01:00
b459f6264a fix regex for sun and moon set and rise 2023-01-02 09:27:41 +01:00
bf9e07c574 fix Undefined subroutine
Undefined subroutine &FHEM::APIs::Weather::wundergroundAPI::strftimeWrapper
2022-12-30 13:17:40 +01:00
420fbff233 fix 2022-12-30 12:17:37 +01:00
b256d1e64b fix sub 2022-12-30 12:14:33 +01:00
c6fe48168f fix undefined value as an ARRAY reference 2022-12-30 12:11:19 +01:00
7ef05e0c00 fix some regex formating 2022-12-29 04:41:10 +01:00
3d4996777f change versions and add control file 2022-12-28 09:24:12 +01:00
232af18f02 remove celvin substration 2022-12-28 09:10:14 +01:00
df08ffb7c4 fix "PERL WARNING: Use of uninitialized value"
no {wind}->{gust} field in $data
2022-12-25 09:20:58 +01:00
7d0a835c71 change versions 2022-12-24 10:20:09 +01:00
4b8aad2047 add directory structure
move API files
remove YahooWeatherAPI
2022-12-24 04:39:45 +01:00