Add Samsung EHS (Eco Heating System) heat pump support
Adds a device registry for the TP1X_DA_AC_EHS board family: separate zone1 (space heating/cooling) and dhw (domestic hot water) loops. zone1 is exposed as power switch + mode select + current/target temperature sensor/number -- it's a leaving-water-temperature setpoint, not a thermostat, so no HA platform fits it better. dhw gets a composite water_heater entity, using the same primary-resource-plus-sibling-reads shape climate.py already uses for the AC (PR #247 review feedback: "Having water heaters automatically leverage the right platform would be pretty cool!"). The unit's away mode is a device-wide switch, not the water_heater AWAY_MODE feature -- /option/outgoing/vs/0 has no dhw-scoped sibling and covers zone1 too, so presenting it on the DHW card would misstate its scope. Operation modes (Eco/Std/Force/Power) map onto HA's own standard water_heater states, the same mapping HA core's smartthings integration uses for this exact Samsung capability over the cloud API. Device codes are matched case-insensitively on the read side. The DHW entity takes a catalog name ("Hot water") rather than the bare device name -- unlike the AC's climate card, it is one loop of a two-loop device. Both temperature ranges fall back as a pair: a resource reporting a minimum but no maximum yields no range at all rather than mixing a device bound with an invented default, matching climate._range(). Increment fallbacks test for None instead of using `or`, so a genuine 0 survives. set_temperature honours the optional operation_mode HA's water_heater service schema forwards, setting the mode (and powering the loop on) before the setpoint, the same way climate's set_temperature handles hvac_mode. Entity names are translated into Czech and Dutch following each file's existing terminology conventions. Verified against a real TP1X_DA_AC_EHS_01001_0000 diagnostics dump (firmware AEH-WW-TP1-22-AE6000_17260402); golden-regression fixture and full test coverage included.
This commit is contained in:
1 parent
e309d3e7b8
commit
6efee761d9
17 files changed
+1807
-4
No files matched your search
@@ -49,6 +49,18 @@ def test_registry_reproduces_golden_state_keys_for_washer():
|
||||
)
|
||||
|
||||
|
||||
def test_registry_reproduces_golden_state_keys_for_ehs():
|
||||
from tests.conftest import _load_device
|
||||
resources = _load_device('ehs')
|
||||
golden = json.loads((GOLDEN / 'ehs.json').read_text())
|
||||
state_keys = _new_state_keys('ehs', resources)
|
||||
assert set(state_keys) == set(golden['state_keys']), (
|
||||
f"state_keys mismatch:\n"
|
||||
f" extra: {sorted(set(state_keys) - set(golden['state_keys']))}\n"
|
||||
f" missing: {sorted(set(golden['state_keys']) - set(state_keys))}"
|
||||
)
|
||||
|
||||
|
||||
def test_registry_reproduces_golden_state_keys_for_washer_wa8000t():
|
||||
"""Top-load washer (WA8000T, issue #106) reports no oneUiVersion and
|
||||
used the 'WA' consumer-model prefix, previously unmapped in
|
||||
|
||||
Reference in new issue
Block a user