Commit Graph

288 Commits (1bb886442651f98508cada979e1043f08df7247f)

Author SHA1 Message Date
SchiZzA 95b3452318
Update constants to more readable form. 2026-07-25 21:47:47 +02:00
SchiZzA f0d24ebde3
Make routes method-aware and update related tests
Include HTTP method in route keys and dispatch, and fix
Routes.show_enabled.
Update register_path to accept a HealthCoordinator and adjust router
stubs in tests. Update WindyPush tests to use response objects
(status/text)
and adapt related exception/notification expectations.
2026-07-25 21:47:47 +02:00
SchiZzA 56950b5e1a
Improve Windy error handling and retry logic 2026-07-25 21:47:47 +02:00
SchiZzA 970828320b
Add multiple health sensors and device info
Introduce HealthSensorEntityDescription and a tuple of sensor
descriptions for integration status, source IP, base URL and addon
response. Instantiate one HealthDiagnosticSensor per description in
async_setup_entry. Update HealthDiagnosticSensor to accept a
description, derive unique_id from description.key and add a cached
device_info returning a SERVICE-type device. Adjust imports.
2026-07-25 21:47:46 +02:00
SchiZzA 8ecbc8c38d
Validate hass data with py_typecheck.checked
Replace manual isinstance checks and casts with py_typecheck.checked()
to validate hass and entry data and return early on errors. Simplify
add_new_sensors by unwrapping values, renaming vars, and passing the
coordinator to WeatherSensor
2026-07-25 21:47:46 +02:00
SchiZzA fa5d268004
Replace casts with checked type helpers
Use checked and checked_or to validate option and hass.data types,
remove unsafe typing.cast calls, simplify coordinator and entry_data
handling, and cache boolean option flags for Windy and Pocasí checks
2026-07-25 21:47:46 +02:00
SchiZzA 0f9bb0dab7
Removed extended debugging info from sensors. Added descriptive method on route info. 2026-07-25 21:47:46 +02:00
SchiZzA 68555160c7
Add WSLink support for additional sensor channels
- Extend constants and WSLink key remapping for channels 3–8 (temp, humidity, battery and connection)
- Add new WSLink sensor entity descriptions for the extra channel readings
- Update English translations for the newly added channel sensors and battery states
2026-07-25 21:47:46 +02:00
SchiZzA 38854698af
Align Windy resend with Stations API response handling
- Add WINDY_MAX_RETRIES constant and use it consistently when deciding to disable resending
- Refactor Windy response verification to rely on HTTP status codes per stations.windy.com API
- Improve error handling for missing password, duplicate payloads and rate limiting
- Enhance retry logging and disable Windy resend via persistent notification on repeated failures
2026-07-25 21:47:46 +02:00
SchiZzA 9ed0a10ffa
Stabilize webhook routing and config updates
- Register aiohttp webhook routes once and switch the active dispatcher handler on option changes
- Make the internal route registry method-aware (GET/POST) and improve enabled-route logging
- Fix OptionsFlow initialization by passing the config entry and using safe defaults for credentials
- Harden Windy resend by validating credentials early, auto-disabling the feature on invalid responses, and notifying the user
- Update translations for Windy credential validation errors
2026-07-25 21:47:45 +02:00
SchiZzA 03d4e43a08
Organize imports in `__init__.py` 2026-07-25 21:45:08 +02:00
SchiZzA dfd2a2c05a
Added support for GET and POST endpoints. 2026-07-25 21:45:08 +02:00
SchiZzA 0060369d8a
Add health diagnostic sensor and extensive tests for sws12500
integration

- Introduce HealthDiagnosticSensor for device health status reporting
- Add new constants and data keys for health sensor integration
- Wire health_sensor module into sensor platform setup
- Refactor sensor descriptions to improve derived sensor handling
- Implement pytest fixtures and comprehensive tests covering:
  - Config flows and options validation
  - Data reception and authentication
  - Sensor platform setup and dynamic sensor addition
  - Push integration with Pocasi.cz and Windy API
  - Route dispatching and error handling
  - Utilities, conversions, and translation functions
2026-07-25 21:45:08 +02:00
SchiZzA 56c73a46a2
Remove numpy dependency and simplify range checks in heat_index function 2026-07-25 21:45:08 +02:00
SchiZzA 8aaa1aa2df
Fix typo in fallback handler name from unregistred to unregistered 2026-07-25 21:45:08 +02:00
SchiZzA 68302c3cfb
Anonymize data payload in PocasiPush logging 2026-07-25 21:45:08 +02:00
SchiZzA e6e173e229
Remove verify_ssl=False from async_get_clientsession calls 2026-07-25 21:45:07 +02:00
SchiZzA aff850492d
Update Windy integration to use station ID and password authentication
- Replace API key with station ID and password for authentication
- Change Windy API endpoint to v2 observation update
- Adapt data conversion for WSLink to Windy format
- Update config flow and translations accordingly
2026-07-25 21:45:07 +02:00
SchiZzA 2cbc198fd0
Update README.md 2026-07-25 21:45:07 +02:00
schizza 078af9a325
Cherry pick README.md 2026-07-25 21:45:07 +02:00
SchiZzA 144108fba1
Refactor SWS12500 integration for push-based updates
- Add detailed architecture overview in __init__.py
- Introduce shared runtime keys in data.py to avoid key conflicts
- Implement dual route dispatcher for webhook endpoint selection
- Enhance sensor platform for dynamic sensor addition without reloads
- Rename battery level "unknown" to "drained" with updated icons
- Improve utils.py with centralized helpers for remapping and discovery
- Update translations and strings for consistency
2026-07-25 21:45:07 +02:00
SchiZzA 42e7225477
Improve data validation and error logging in utils.py 2026-07-25 21:45:07 +02:00
SchiZzA 21e1b81bb8
Rename battery_level_to_text to battery_level and update docstring 2026-07-25 21:45:06 +02:00
SchiZzA c530a74503
Fix logging of unregistered route to include path 2026-07-25 21:45:06 +02:00
SchiZzA d814c9942d
Improve type safety, add data validation, and refactor route handling
- Add typing and runtime checks with py_typecheck for config options and
  incoming data
- Enhance authentication validation and error handling in data
  coordinator
- Refactor Routes class with better dispatch logic and route
  enabling/disabling
- Clean up async functions and improve logging consistency
- Add type hints and annotations throughout the integration
- Update manifest to include typecheck-runtime dependency
2026-07-25 21:45:06 +02:00
SchiZzA 35fd0585f9
Config_flow for Ecowitt 2026-07-25 21:45:06 +02:00
SchiZzA aaaab107de
Refactor config_flow, add support for Ecowitt configuration 2026-07-25 21:45:06 +02:00
SchiZzA 7582f1e9b4
fix: Corrected RAIN and DAILYRAIN for PWS protocol.
The `RAININ` suppose to be accumulated rainfall in 60 minutes. So the
unit must be in `mm/h` or `in/h`.
In the opposite `DAILYRAIN` is rain in the day do far, represented in
accumulated `mm` or `in`.
2026-05-18 20:49:01 +02:00
SchiZzA 485c56a6b8
Bump version to 1.8.5
- Bump version to 1.8.5.
- update README
2026-05-12 00:32:37 +02:00
SchiZzA 93fd85a487
Add HCHO / VOC air-quality sensors (T9 module)
Support the WSLink t9 air-quality module:
  - t9hcho (formaldehyde, ppb),
  - t9voclv (VOC level 1-5 -> ENUM state)
  - t9bat (0-5 battery -> percentage).

  The t9hcho/t9voclv/t9bat values are dropped when
  t9cn reports the module as disconnected,
  so no empty entities are created.

  - const: HCHO/VOC/T9_BATTERY keys, VOCLevel enum +
  VOC_LEVEL_MAP, BATTERY_NON_BINARY, CONNECTION_GATED_SENSORS,
  REMAP_WSLINK_ITEMS entries
  - utils: voc_level_to_text(),
  battery_5step_to_pct(), connection gating
  - sensors_wslink: HCHO / VOC / T9_BATTERY entity
  descriptions
  - translations (en, cs): hcho, voc (+ states),
  t9_battery
  - tests: tests/conftest.py +
  tests/test_t9_air_quality.py
2026-05-11 23:55:36 +02:00
Lukas Svoboda 8547e7a7f5
Update README.md 2026-04-11 17:26:16 +02:00
Lukas Svoboda 6ba7d284de
Update README with Ecowitt station support details
Added information about Ecowitt station support and pre-release details.
2026-04-11 16:53:32 +02:00
Lukas Svoboda 4208d9d3c9
Update README with integration renaming and setup details
Clarified integration renaming and migration plans, updated WSLink app instructions, and corrected minor typos.
2026-04-10 18:42:52 +02:00
SchiZzA bab704b125
Bump version to 1.8.4 2026-03-05 15:56:02 +01:00
SchiZzA faf07189c5
Updated `config_flow`.
Updated `config_flow` as in HA 2026.3+ will crash on reconfiguring
options.
2026-03-05 15:53:03 +01:00
SchiZzA 5a1d04944e
Bump version. 2026-02-28 18:43:18 +01:00
SchiZzA 30b88a0f13
Fix options flow and route switching after config updates
- Keep OptionsFlow state in sync by building defaults from entry data + options
- Store the config entry on the coordinator for consistent access
- Make route registry method-aware and switch handlers by url_path with
  awarness of POST/GET method.
- Fixed an issue, when on config update needs restart of HomeAssistant
  to reload integration.
2026-02-28 18:37:19 +01:00
SchiZzA 048bd6bd4c
Fix Windy credential validation for None/blank options
Normalize Windy station ID and password from config options and require both values before enabling Windy resend.
2026-02-26 19:33:36 +01:00
Lukas Svoboda 3822557f74
Merge pull request #96 from schizza/fix/push_data_not_accepted
Added support for POST and GET methods in WSLink.
2026-02-26 19:07:16 +01:00
SchiZzA 96094105e0
Added support for POST and GET methods in WSLink.
Some stations sending data in POST method and some in GET method.
We now support both variants.
2026-02-26 18:09:52 +01:00
SchiZzA 6b8fdd5477
Accept push data for WSLink. 2026-02-25 08:30:55 +01:00
SchiZzA b0bae69f33
Update version. 2026-02-23 18:41:58 +01:00
Lukas Svoboda 5ca0d65cd6
Fixing error when Windy was not set correctly. (#95)
* Fixing error when Windy was not set correctly.

Fixed an issue when integration fails to send data to Windy and crashed,
so no data was accepted from station.
Windy resend is disabled on misconfiguration detect.

* Fixed WSLink bool in resend function.
2026-02-23 18:31:25 +01:00
SchiZzA 55652415f4
Update README.md 2026-02-03 17:48:23 +01:00
SchiZzA ab69cea054
Update README to reflect new stations and future plans
- Add support for SWS 10500 and Pocasi Meteo
- Announce upcoming Ecowitt support and integration rename
- Clarify WSLink SSL proxy requirements and upgrade instructions
2026-02-03 17:43:39 +01:00
Lukas Svoboda 965f562c53
Merge pull request #92 from schizza/wslink_api_update
Update Windy integration to use new API endpoint
2026-01-30 17:17:08 +01:00
SchiZzA cf1026f2b9
Update Windy integration to use station ID and password authentication
- Replace API key with station ID and password for Windy data push
- Change Windy update URL and add authorization header
- Update config flow and constants to support new credentials
- Adjust data mapping for WSLink compatibility
- Change WSLink endpoint HTTP method to POST
2026-01-30 17:14:21 +01:00
Lukas Svoboda 9f36ab5d4c
Add CODEOWNERS file with owner assignment 2026-01-17 10:26:07 +01:00
Lukas Svoboda 94ec3cb0e5
Merge pull request #86 from schizza/fix/index_computing
Fix Heat Index and Chill Index
2025-12-22 11:47:42 +01:00
SchiZzA 743e62c6dd
Fix Heat Index and Chill Index
Fixed computing Heat and Chill index in cases that outside senosor
battery is drained and station stop sending data for outside temp,
humidity and wind.
2025-12-22 11:47:02 +01:00