SWS-12500-custom-component/custom_components/sws12500
SchiZzA 418d0c7546
fix(security): harden forwarders, cap native ecowitt entities, reject empty creds
- S8: received_data now rejects empty configured credentials (IncorrectDataError)
  and present-but-empty incoming credentials (HTTPUnauthorized) instead of relying
  solely on the config flow. Credential validation extracted into
  _validate_credentials() (also resolves the C901 complexity warning and unifies
  the WU/WSLink branches).
- S6: cap auto-created native Ecowitt entities (MAX_NATIVE_ECOWITT_SENSORS) to bound
  entity-registry growth from a fabricated multi-key payload.
- S5: store only the exception class name in Windy/Pocasi last_error (surfaced via
  entity attributes; str(ex) could embed the request URL).
- S7: verified safe - the native-sensor INFO log is parametrized (%s), so no
  format-string injection; left as-is.

308 passing, 100% coverage; ruff + basedpyright clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 18:48:50 +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(security): harden forwarders, cap native ecowitt entities, reject empty creds 2026-06-21 18:48:50 +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(security): harden forwarders, cap native ecowitt entities, reject empty creds 2026-06-21 18:48:50 +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(security): harden forwarders, cap native ecowitt entities, reject empty creds 2026-06-21 18:48:50 +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(security): harden forwarders, cap native ecowitt entities, reject empty creds 2026-06-21 18:48:50 +02:00