SWS-12500-custom-component/custom_components/sws12500
SchiZzA 038d2459b9
fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util
- C1: received_data / received_ecowitt_data return 503 (not 500) when the entry is
  mid-reload (runtime_data gone); add_new_sensors / add_new_binary_sensors are
  defensive no-ops in that window too.
- C2/C3: Windy and Pocasi reserve their next send window *before* the await, so
  concurrent webhooks can no longer both pass the rate-limit check and double-send
  (which could falsely trip the auto-disable threshold).
- C5: EcowittBridge.set_add_entities flushes unmapped sensors parsed before the
  platform was ready (aioecowitt fires new_sensor_cb only once per key).
- C6: a forwarder auto-disabling itself from the hot path no longer forces a full
  config-entry reload (update_listener now skips reload for live-read flags
  SENSORS_TO_LOAD / WINDY_ENABLED / POCASI_CZ_ENABLED).
- C7: to_int accepts decimal-formatted integers ("180.0").
- C8: forwarders use dt_util.utcnow() (UTC-aware) instead of naive datetime.now().

Tests updated; 305 passing, 100% coverage; ruff + basedpyright clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 18:32:00 +02:00
..
translations fix(security)+i18n: stop health-attribute leak, mask secrets in logs, sync translations 2026-06-21 18:08:34 +02:00
__init__.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00
battery_sensors.py Implement Ecowitt protocol support and dynamic binary sensor discovery. 2026-04-11 16:37:17 +02:00
battery_sensors_def.py fix: coordinator reuse, route dispatcher, binary sensor translations & test suite alignment 2026-06-01 17:01:40 +02:00
binary_sensor.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00
config_flow.py fix: address review findings across forwarders and helpers 2026-06-21 12:51:35 +02:00
const.py fix: address review findings across forwarders and helpers 2026-06-21 12:51:35 +02:00
coordinator.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00
data.py Add stall sensor detection. 2026-06-01 17:47:30 +02:00
diagnostics.py fix(security)+i18n: stop health-attribute leak, mask secrets in logs, sync translations 2026-06-21 18:08:34 +02:00
ecowitt.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00
health_coordinator.py fix(security)+i18n: stop health-attribute leak, mask secrets in logs, sync translations 2026-06-21 18:08:34 +02:00
health_sensor.py fix(security)+i18n: stop health-attribute leak, mask secrets in logs, sync translations 2026-06-21 18:08:34 +02:00
icons.json Refactor SWS12500 integration for push-based updates 2026-01-27 09:21:27 +01:00
legacy.py fix: coordinator reuse, route dispatcher, binary sensor translations & test suite alignment 2026-06-01 17:01:40 +02:00
manifest.json Implement Ecowitt protocol support and dynamic binary sensor discovery. 2026-04-11 16:37:17 +02:00
pocasti_cz.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00
routes.py fix(routes): rebind sticky health route on reload; defensive resolve 2026-06-21 12:51:14 +02:00
sensor.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00
sensors_common.py fix: coordinator reuse, route dispatcher, binary sensor translations & test suite alignment 2026-06-01 17:01:40 +02:00
sensors_weather.py fix: address review findings across forwarders and helpers 2026-06-21 12:51:35 +02:00
sensors_wslink.py fix: address review findings across forwarders and helpers 2026-06-21 12:51:35 +02:00
staleness.py Add stall sensor detection. 2026-06-01 17:47:30 +02:00
strings.json fix(security)+i18n: stop health-attribute leak, mask secrets in logs, sync translations 2026-06-21 18:08:34 +02:00
sws12500 Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
utils.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00
windy_func.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00