Add INFO logging to generic_thermostat component for keep-alive turn … (#28740)

* Add INFO logging to generic_thermostat component for keep-alive turn on/off

* run black
pull/30635/head
Nathan 2020-01-10 10:20:16 +11:00 committed by springstan
parent 7052cdded1
commit 955aa1de39
1 changed files with 7 additions and 0 deletions

View File

@ -416,6 +416,10 @@ class GenericThermostat(ClimateDevice, RestoreEntity):
await self._async_heater_turn_off()
elif time is not None:
# The time argument is passed only in keep-alive case
_LOGGER.info(
"Keep-alive - Turning on heater heater %s",
self.heater_entity_id,
)
await self._async_heater_turn_on()
else:
if (self.ac_mode and too_hot) or (not self.ac_mode and too_cold):
@ -423,6 +427,9 @@ class GenericThermostat(ClimateDevice, RestoreEntity):
await self._async_heater_turn_on()
elif time is not None:
# The time argument is passed only in keep-alive case
_LOGGER.info(
"Keep-alive - Turning off heater %s", self.heater_entity_id
)
await self._async_heater_turn_off()
@property