Skip to content

Commit

Permalink
Fix for secondary features
Browse files Browse the repository at this point in the history
  • Loading branch information
RobHofmann authored Jun 12, 2023
1 parent 896d911 commit 42e1b14
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions custom_components/gree/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,7 @@ async def _async_temp_sensor_changed(self, entity_id, old_state, new_state):
if new_state is None:
return
self._async_update_current_temp(new_state)
for x in self.async_update_ha_state():
yield x
return self.async_update_ha_state()

@callback
def _async_update_current_temp(self, state):
Expand Down Expand Up @@ -496,8 +495,7 @@ async def _async_lights_entity_state_changed(self, entity_id, old_state, new_sta
# do nothing if state change is triggered due to Sync with HVAC
return
self._async_update_current_lights(new_state)
for x in self.async_update_ha_state():
yield x
return self.async_update_ha_state()

@callback
def _async_update_current_lights(self, state):
Expand All @@ -522,8 +520,7 @@ async def _async_xfan_entity_state_changed(self, entity_id, old_state, new_state
_LOGGER.info('Cant set xfan in %s mode' % str(self._hvac_mode))
return
self._async_update_current_xfan(new_state)
for x in self.async_update_ha_state():
yield x
return self.async_update_ha_state()

@callback
def _async_update_current_xfan(self, state):
Expand All @@ -544,8 +541,7 @@ async def _async_health_entity_state_changed(self, entity_id, old_state, new_sta
# do nothing if state change is triggered due to Sync with HVAC
return
self._async_update_current_health(new_state)
for x in self.async_update_ha_state():
yield x
return self.async_update_ha_state()

@callback
def _async_update_current_health(self, state):
Expand All @@ -570,8 +566,7 @@ async def _async_powersave_entity_state_changed(self, entity_id, old_state, new_
_LOGGER.info('Cant set powersave in %s mode' % str(self._hvac_mode))
return
self._async_update_current_powersave(new_state)
for x in self.async_update_ha_state():
yield x
return self.async_update_ha_state()

@callback
def _async_update_current_powersave(self, state):
Expand All @@ -597,8 +592,7 @@ async def _async_sleep_entity_state_changed(self, entity_id, old_state, new_stat
_LOGGER.info('Cant set sleep in %s mode' % str(self._hvac_mode))
return
self._async_update_current_sleep(new_state)
for x in self.async_update_ha_state():
yield x
return self.async_update_ha_state()

@callback
def _async_update_current_sleep(self, state):
Expand All @@ -623,8 +617,7 @@ async def _async_eightdegheat_entity_state_changed(self, entity_id, old_state, n
_LOGGER.info('Cant set 8℃ heat in %s mode' % str(self._hvac_mode))
return
self._async_update_current_eightdegheat(new_state)
for x in self.async_update_ha_state():
yield x
return self.async_update_ha_state()

@callback
def _async_update_current_eightdegheat(self, state):
Expand All @@ -645,8 +638,7 @@ async def _async_air_entity_state_changed(self, entity_id, old_state, new_state)
# do nothing if state change is triggered due to Sync with HVAC
return
self._async_update_current_air(new_state)
for x in self.async_update_ha_state():
yield x
return self.async_update_ha_state()

@callback
def _async_update_current_air(self, state):
Expand Down

0 comments on commit 42e1b14

Please sign in to comment.