Open Wh1terat opened 3 years ago
Kinda implemented - bit of a hack. Still need to find a good way to stop users being able to turn off the filter until the cool down has completed.
async def async_turn_off(self):
"""Turn heater off and filter 30 secs later."""
await self.hass.async_add_executor_job(
self.coordinator.client.set_data,
self.coordinator.device_id,
self.info_type[CONF_COMMAND_OFF]
)
# Not sure if this is 'naughty' or not
self.hass.loop.call_later(
COOLDOWN_TIME,
self.hass.async_add_executor_job,
self.coordinator.client.set_data,
self.coordinator.device_id,
{MAP_KEYS_INV['filter']: 0}
)
await self.coordinator.async_request_refresh()
The filter needs to be circulating for a short time after disabling the heater in order to cool the heater down. Need to implement some kind of timer to prevent the filter from being disabled too soon.