SWS-12500-custom-component/custom_components/sws12500
SchiZzA 793ea1991a
feat(device): merge all entities into one shared device with station-type model
All entities (weather, battery, health, native Ecowitt) now report through a
single device under the existing {(DOMAIN,)} identifier, removing the separate
"Ecowitt {model}" device that appeared whenever Ecowitt was enabled. This
collapses the previous two-device layout (and the duplicate/untranslated native
Ecowitt sensors living on the second device) into one.

The device model reflects the running station type via _station_model():
"Ecowitt <model>" when Ecowitt is active (model learned from the payload's
`model` field and stored on runtime_data.ecowitt_model), else "WSLink", else
"PWS". Device identity is centralised in data.build_device_info() and reused by
every platform.

No device-registry migration is required: the identifier is unchanged; only the
model/grouping change. Full device unification under a renamed hub is deferred
to the rename round.

Tests: device-info assertions updated to the shared device across the entity
suites; new _station_model/build_device_info branch coverage in test_data.py;
received_ecowitt now asserts the learned model. 320 passed, 100% coverage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-25 21:47:53 +02:00
..
translations feat(ecowitt): dedupe unit-variant sensors and translate common native ones 2026-07-25 21:47:53 +02:00
__init__.py chore(quality): manifest keys, ConfigEntryNotReady, remove dead sqlite code 2026-07-25 21:47:52 +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 fix: coordinator reuse, route dispatcher, binary sensor translations & test suite alignment 2026-07-25 21:47:50 +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 feat(config-flow): mask secret fields with password selectors (Q7) 2026-07-25 21:47:52 +02:00
const.py fix: address review findings across forwarders and helpers 2026-07-25 21:47:51 +02:00
coordinator.py feat(device): merge all entities into one shared device with station-type model 2026-07-25 21:47:53 +02:00
data.py feat(device): merge all entities into one shared device with station-type model 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 feat(device): merge all entities into one shared device with station-type model 2026-07-25 21:47:53 +02:00
health_coordinator.py fix(health): reflect Ecowitt as a protocol in the diagnostics summary 2026-07-25 21:47:53 +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: coordinator reuse, route dispatcher, binary sensor translations & test suite alignment 2026-07-25 21:47:50 +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(security): harden forwarders, cap native ecowitt entities, reject empty creds 2026-07-25 21:47:52 +02:00
routes.py fix(routes): rebind sticky health route on reload; defensive resolve 2026-07-25 21:47:51 +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 fix: address review findings across forwarders and helpers 2026-07-25 21:47:51 +02:00
staleness.py Add stall sensor detection. 2026-07-25 21:47:50 +02:00
strings.json feat(ecowitt): dedupe unit-variant sensors and translate common native ones 2026-07-25 21:47:53 +02:00
sws12500 Add health diagnostic sensor and extensive tests for sws12500 2026-07-25 21:45:08 +02:00
utils.py chore(quality): manifest keys, ConfigEntryNotReady, remove dead sqlite code 2026-07-25 21:47:52 +02:00
windy_func.py fix(security): harden forwarders, cap native ecowitt entities, reject empty creds 2026-07-25 21:47:52 +02:00