Skip to content

Commit 5b504f6

Browse files
committed
feat: implement power-reset turn_off for manual E-heater assist switch
1 parent e28e2b3 commit 5b504f6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • custom_components/midea_heatpump_hws

custom_components/midea_heatpump_hws/switch.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,5 +197,7 @@ async def async_turn_on(self, **kwargs: Any) -> None:
197197
await self.coordinator.write_register("heater_assist_trigger", 1)
198198

199199
async def async_turn_off(self, **kwargs: Any) -> None:
200-
"""Off writes are not directly supported by the controller, warn user."""
201-
_LOGGER.warning("Direct off-toggle for E-heater assist is not supported by the controller. It will automatically self-clear when the target temperature is reached.")
200+
"""Turn off E-heater assist by resetting power state to clear R4 trigger."""
201+
_LOGGER.info("Resetting power state to turn off manual E-heater assist")
202+
await self.coordinator.write_register("power_state", False)
203+
await self.coordinator.write_register("power_state", True)

0 commit comments

Comments
 (0)