Skip to content

Commit

Permalink
misc reset boost after 1hr if everything dies.
Browse files Browse the repository at this point in the history
  • Loading branch information
magnuselden authored and magnuselden committed Nov 16, 2023
1 parent 6745993 commit 2168d4b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,12 @@ async def async_reset_water_boost(self):
async def async_update_operation(self, caller=None):
self._update_operation()

def _check_and_reset_boost(self) -> None:
if self.model.water_boost.value and self.model.latest_boost_call - time.time() > 3600:
_LOGGER.debug("Water boost has been on for more than an hour. Turning off.")
self.model.water_boost.value = False
def _update_operation(self) -> None:
self._check_and_reset_boost()
if self.is_initialized:
if self._hub.sensors.set_temp_indoors.preset != HvacPresets.Away:
self._set_water_heater_operation(HIGHTEMP_THRESHOLD)
Expand Down

0 comments on commit 2168d4b

Please sign in to comment.