Fix Gree climate turn on/off (#44731)

pull/44732/head
Franck Nijhof 2021-01-01 15:11:25 +01:00 committed by GitHub
parent f0e96f739b
commit 1f0a6b178e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -221,15 +221,17 @@ class GreeClimateEntity(CoordinatorEntity, ClimateEntity):
"""Turn on the device."""
_LOGGER.debug("Turning on HVAC for device %s", self._name)
self._device.power = True
await self._push_state_update()
self.coordinator.device.power = True
await self.coordinator.push_state_update()
self.async_write_ha_state()
async def async_turn_off(self) -> None:
"""Turn off the device."""
_LOGGER.debug("Turning off HVAC for device %s", self._name)
self._device.power = False
await self._push_state_update()
self.coordinator.device.power = False
await self.coordinator.push_state_update()
self.async_write_ha_state()
@property
def hvac_modes(self) -> List[str]: