From a3e62c9ecf4066e3301acdbbba6f70f44fb773a6 Mon Sep 17 00:00:00 2001 From: Nyro Date: Tue, 13 Dec 2022 00:08:10 +0100 Subject: [PATCH] Fix issue on Overkiz Domestic Hot water heater entities with away mode (#83684) * Don't call set boostMode Duration with 0 to disable boost mode * use states.get() instead of states[] * Revert select states --- .../domestic_hot_water_production.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/overkiz/water_heater_entities/domestic_hot_water_production.py b/homeassistant/components/overkiz/water_heater_entities/domestic_hot_water_production.py index 5c6ce27942b..b8a595e55e0 100644 --- a/homeassistant/components/overkiz/water_heater_entities/domestic_hot_water_production.py +++ b/homeassistant/components/overkiz/water_heater_entities/domestic_hot_water_production.py @@ -306,14 +306,6 @@ class DomesticHotWaterProduction(OverkizEntity, WaterHeaterEntity): OverkizCommand.SET_BOOST_MODE, OverkizCommand.OFF ) - if self.executor.has_command(OverkizCommand.SET_BOOST_MODE_DURATION): - await self.executor.async_execute_command( - OverkizCommand.SET_BOOST_MODE_DURATION, 0 - ) - await self.executor.async_execute_command( - OverkizCommand.REFRESH_BOOST_MODE_DURATION - ) - if self.executor.has_command(OverkizCommand.SET_CURRENT_OPERATING_MODE): current_operating_mode = self.executor.select_state( OverkizState.CORE_OPERATING_MODE @@ -332,5 +324,10 @@ class DomesticHotWaterProduction(OverkizEntity, WaterHeaterEntity): OverkizCommand.SET_DHW_MODE, self.overkiz_to_operation_mode[operation_mode] ) + if self.executor.has_command(OverkizCommand.REFRESH_BOOST_MODE_DURATION): + await self.executor.async_execute_command( + OverkizCommand.REFRESH_BOOST_MODE_DURATION + ) + if self.executor.has_command(OverkizCommand.REFRESH_DHW_MODE): await self.executor.async_execute_command(OverkizCommand.REFRESH_DHW_MODE)