From 82aede9bbfb613a9cb49ce61f38bb9999ef56371 Mon Sep 17 00:00:00 2001 From: Shay Levy <1858925+thecode@users.noreply.github.com> Date: Sat, 28 Nov 2026 21:21:01 +0200 Subject: [PATCH] Refresh Shelly thermostat config in place on setpoint and mode changes (#195180) Co-authored-by: Claude Opus 5.5 --- homeassistant/components/shelly/coordinator.py | 1 + tests/components/shelly/test_coordinator.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/homeassistant/components/shelly/coordinator.py b/homeassistant/components/shelly/coordinator.py index cc1935b6eb3c..b68eeac788ec 100644 --- a/homeassistant/components/shelly/coordinator.py +++ b/homeassistant/components/shelly/coordinator.py @@ -123,6 +123,7 @@ RPC_CONFIG_STATE_KEYS: dict[str, frozenset[str] | None] = { "ui": None, "switch": frozenset({"in_locked"}), "cover": frozenset({"in_locked"}), + "thermostat": frozenset({"enable", "target_C"}), } diff --git a/tests/components/shelly/test_coordinator.py b/tests/components/shelly/test_coordinator.py index 28f8a02a9922..5f9d1b3b92ad 100644 --- a/tests/components/shelly/test_coordinator.py +++ b/tests/components/shelly/test_coordinator.py @@ -507,6 +507,10 @@ def _inject_config_changed( pytest.param("switch:0", {"in_locked", "name"}, 1, id="switch_mixed_keys"), pytest.param("cover:0", {"in_locked"}, 0, id="cover_state_key"), pytest.param("cover:0", {"name"}, 1, id="cover_other_key"), + pytest.param( + "thermostat:0", {"enable", "target_C"}, 0, id="thermostat_state_keys" + ), + pytest.param("thermostat:0", {"type"}, 1, id="thermostat_other_key"), ], ) async def test_rpc_cfg_change_refresh(