Skip to content

Commit

Permalink
Support turn_on (#146)
Browse files Browse the repository at this point in the history
Support for using the climate.turn_on service.
  • Loading branch information
azuwis committed Jul 30, 2023
1 parent 42e1b14 commit 463d7e7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions custom_components/gree/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,12 @@ def set_hvac_mode(self, hvac_mode):
self.SyncState({'Mod': self._hvac_modes.index(hvac_mode), 'Pow': 1})
self.schedule_update_ha_state()

def turn_on(self):
_LOGGER.info('turn_on(): ')
# Turn on.
self.SyncState({'Pow': 1})
self.schedule_update_ha_state()

async def async_added_to_hass(self):
_LOGGER.info('Gree climate device added to hass()')
self.SyncState()
Expand Down

0 comments on commit 463d7e7

Please sign in to comment.