From 4c2975ad993973fcc9384479cfdf645f44d5671f 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 49524e19373..2a8d93bf8eb 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 @@ -305,14 +305,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 @@ -331,5 +323,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)