Commit Graph

36 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
12595b3674 ```
Refactor pre-commit hook file list and output formatting

Updated the list of files in the pre-commit hook to remove
references to 'lib/FHEM/APIs/Weather/DarkSkyAPI.pm' and adjusted
the output formatting for better readability. The order of the
files in the @filenames array has been restructured for clarity.
These changes were necessary to ensure our code base focuses on
the more relevant weather API files.

No breaking changes introduced; the pre-commit hook continues to
function as intended.
```
2025-02-05 07:07:52 +01:00
e60509fbfd docs: fix unbalanced p 2025-02-04 21:26:52 +01: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
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
99b46338ca build: v2.2.22 2023-01-10 21:43:26 +01:00
a78a1a986d docs: add new modul path in to pre-commit
add new modul path in to pre-commit hook file
2023-01-10 21:37:10 +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
0a2f755324 fix: bugfix function WeatherAsHtmlD not working 2023-01-08 21:54:31 +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
f79f0c6fa8 docs: change commandref
change commandref with id tags
2023-01-07 13:21:27 +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