SWS-12500-custom-component/custom_components/sws12500
SchiZzA 7c9343f90d
fix(sws12500): harden credential validation, URL fallback and push timeouts
- Reject blank or whitespace-only PWS credentials in both the config flow and
  the options flow. INVALID_CREDENTIALS only held placeholder strings, so an
  empty API ID or key passed validation, the entry was created, and
  _validate_credentials then rejected every incoming packet.
- Fall back to "UNKNOWN" host/port when get_url raises NoURLAvailableError.
  The values are shown as Ecowitt setup instructions only, so an unresolvable
  Home Assistant URL must not make the step unreachable.
- Catch TimeoutError alongside ClientError in the Windy and Pocasi push paths.
  A timeout is not a ClientError and used to escape into the webhook handler,
  answering the station with HTTP 500 even though the measured data was
  already stored.
- Add regression tests for all three and pin that 0-5 battery descriptions
  really reach the WSLink sensor platform.
2026-07-26 00:39:15 +02:00
..
translations no-mistakes(review): Migrate Pocasi option key, fix typos and Windy status 2026-07-25 22:12:55 +02:00
__init__.py no-mistakes(review): Migrate Pocasi option key, fix typos and Windy status 2026-07-25 22:12:55 +02:00
battery_sensors.py feat(device): merge all entities into one shared device with station-type model 2026-07-25 21:47:53 +02:00
battery_sensors_def.py refactor(sws12500): centralize battery sensor classification 2026-07-25 23:24:45 +02:00
binary_sensor.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-07-25 21:47:52 +02:00
config_flow.py fix(sws12500): harden credential validation, URL fallback and push timeouts 2026-07-26 00:39:15 +02:00
conflicts.py fix: block enabling legacy and Ecowitt protocols together 2026-07-25 21:47:53 +02:00
const.py refactor(sws12500): centralize battery sensor classification 2026-07-25 23:24:45 +02:00
coordinator.py fix: address remaining review findings across forwarders and utils 2026-07-25 21:47:54 +02:00
data.py fix: block enabling legacy and Ecowitt protocols together 2026-07-25 21:47:53 +02:00
diagnostics.py fix(security)+i18n: stop health-attribute leak, mask secrets in logs, sync translations 2026-07-25 21:47:52 +02:00
ecowitt.py fix: address remaining review findings across forwarders and utils 2026-07-25 21:47:54 +02:00
health_coordinator.py fix: address remaining review findings across forwarders and utils 2026-07-25 21:47:54 +02:00
health_sensor.py feat(device): merge all entities into one shared device with station-type model 2026-07-25 21:47:53 +02:00
icons.json Refactor SWS12500 integration for push-based updates 2026-07-25 21:45:07 +02:00
legacy.py fix: address remaining review findings across forwarders and utils 2026-07-25 21:47:54 +02:00
manifest.json chore(quality): manifest keys, ConfigEntryNotReady, remove dead sqlite code 2026-07-25 21:47:52 +02:00
pocasti_cz.py fix(sws12500): harden credential validation, URL fallback and push timeouts 2026-07-26 00:39:15 +02:00
routes.py fix: address remaining review findings across forwarders and utils 2026-07-25 21:47:54 +02:00
sensor.py feat(device): merge all entities into one shared device with station-type model 2026-07-25 21:47:53 +02:00
sensors_common.py fix: coordinator reuse, route dispatcher, binary sensor translations & test suite alignment 2026-07-25 21:47:50 +02:00
sensors_weather.py fix: address review findings across forwarders and helpers 2026-07-25 21:47:51 +02:00
sensors_wslink.py refactor(sws12500): centralize battery sensor classification 2026-07-25 23:24:45 +02:00
staleness.py Add stall sensor detection. 2026-07-25 21:47:50 +02:00
strings.json no-mistakes(review): Migrate Pocasi option key, fix typos and Windy status 2026-07-25 22:12:55 +02:00
sws12500 Add health diagnostic sensor and extensive tests for sws12500 2026-07-25 21:45:08 +02:00
utils.py fix: address remaining review findings across forwarders and utils 2026-07-25 21:47:54 +02:00
windy_func.py fix(sws12500): harden credential validation, URL fallback and push timeouts 2026-07-26 00:39:15 +02:00