SWS-12500-custom-component/tests
SchiZzA 80c944fc5a
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-06-21 23:37:11 +02:00
..
conftest.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_binary_battery.py feat(device): merge all entities into one shared device with station-type model 2026-06-21 23:37:11 +02:00
test_config_flow.py test: reach 100% coverage of custom_components/sws12500 2026-06-21 13:23:34 +02:00
test_const.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_data.py feat(device): merge all entities into one shared device with station-type model 2026-06-21 23:37:11 +02:00
test_diagnostics.py test: reach 100% coverage of custom_components/sws12500 2026-06-21 13:23:34 +02:00
test_ecowitt_bridge.py feat(device): merge all entities into one shared device with station-type model 2026-06-21 23:37:11 +02:00
test_health.py feat(device): merge all entities into one shared device with station-type model 2026-06-21 23:37:11 +02:00
test_init.py test: reach 100% coverage of custom_components/sws12500 2026-06-21 13:23:34 +02:00
test_integration_lifecycle.py chore(quality): manifest keys, ConfigEntryNotReady, remove dead sqlite code 2026-06-21 19:01:32 +02:00
test_pocasi_push.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00
test_received_data.py fix(security): harden forwarders, cap native ecowitt entities, reject empty creds 2026-06-21 18:48:50 +02:00
test_received_ecowitt.py feat(device): merge all entities into one shared device with station-type model 2026-06-21 23:37:11 +02:00
test_routes.py Make routes method-aware and update related tests 2026-03-04 07:53:26 +01:00
test_routes_more.py test: reach 100% coverage of custom_components/sws12500 2026-06-21 13:23:34 +02:00
test_sensor_platform.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00
test_sensors_common.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_sensors_weather.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_sensors_wslink.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00
test_staleness_legacy.py test: reach 100% coverage of custom_components/sws12500 2026-06-21 13:23:34 +02:00
test_strings.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_t9_air_quality.py test: align suite with v2.0 runtime_data architecture 2026-06-21 12:51:52 +02:00
test_translations_cs.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_translations_en.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_utils.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_utils_conv.py fix(security)+i18n: stop health-attribute leak, mask secrets in logs, sync translations 2026-06-21 18:08:34 +02:00
test_utils_more.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_weather_sensor_entity.py feat(device): merge all entities into one shared device with station-type model 2026-06-21 23:37:11 +02:00
test_windy_func.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_windy_more.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00
test_windy_push.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00