SWS-12500-custom-component/custom_components/sws12500
SchiZzA 3fdebc6f20
feat(ecowitt): dedupe unit-variant sensors and translate common native ones
Two long-standing rough edges with Ecowitt running alongside the SWS device:

- Dedup (#1): aioecowitt emits both metric and imperial sensors per quantity
  (tempc/tempf, rainratemm/rainratein, ...). Only the imperial twin is mapped to the
  SWS sensors, so the metric twin (and other unmapped extras) showed up as duplicate
  native entities. _on_new_sensor now skips a key whose unit-variant twin is already
  mapped or already created (twin groups derived from aioecowitt's SENSOR_MAP). HA
  converts units via device_class, so a single variant suffices.
- Translation (#2): native sensors used the raw English aioecowitt name. Common
  single-instance families (rain rate / hourly / event / 24h / weekly / monthly /
  yearly / total rain, absolute pressure, feels-like, indoor dew point, CO2) now use
  curated translation_keys (added to strings/en/cs); long-tail / multi-channel
  sensors keep the English name fallback.
- Also add the imperial RAIN_RATE_INCHES / RAIN_COUNT_INCHES to STYPE_TO_HA so those
  native rain sensors get a device class and unit.

Device unification (one "WeatherHub" device + station-type sensor) stays for the
rename round, as agreed.

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

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 22:55:58 +02:00
..
translations feat(ecowitt): dedupe unit-variant sensors and translate common native ones 2026-06-21 22:55:58 +02:00
__init__.py chore(quality): manifest keys, ConfigEntryNotReady, remove dead sqlite code 2026-06-21 19:01:32 +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 feat(config-flow): mask secret fields with password selectors (Q7) 2026-06-21 19:10:31 +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 feat(ecowitt): dedupe unit-variant sensors and translate common native ones 2026-06-21 22:55:58 +02:00
health_coordinator.py fix(health): reflect Ecowitt as a protocol in the diagnostics summary 2026-06-21 21:47:05 +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 chore(quality): manifest keys, ConfigEntryNotReady, remove dead sqlite code 2026-06-21 19:01:32 +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 feat(ecowitt): dedupe unit-variant sensors and translate common native ones 2026-06-21 22:55:58 +02:00
sws12500 Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
utils.py chore(quality): manifest keys, ConfigEntryNotReady, remove dead sqlite code 2026-06-21 19:01:32 +02:00
windy_func.py fix(security): harden forwarders, cap native ecowitt entities, reject empty creds 2026-06-21 18:48:50 +02:00