|
@@ -319,7 +319,7 @@ class SmartIRClimate(ClimateEntity, RestoreEntity):
|
|
|
if not self._hvac_mode.lower() == HVAC_MODE_OFF:
|
|
if not self._hvac_mode.lower() == HVAC_MODE_OFF:
|
|
|
await self.send_command()
|
|
await self.send_command()
|
|
|
|
|
|
|
|
- await self.async_update_ha_state()
|
|
|
|
|
|
|
+ self.async_write_ha_state()
|
|
|
|
|
|
|
|
async def async_set_hvac_mode(self, hvac_mode):
|
|
async def async_set_hvac_mode(self, hvac_mode):
|
|
|
"""Set operation mode."""
|
|
"""Set operation mode."""
|
|
@@ -329,7 +329,7 @@ class SmartIRClimate(ClimateEntity, RestoreEntity):
|
|
|
self._last_on_operation = hvac_mode
|
|
self._last_on_operation = hvac_mode
|
|
|
|
|
|
|
|
await self.send_command()
|
|
await self.send_command()
|
|
|
- await self.async_update_ha_state()
|
|
|
|
|
|
|
+ self.async_write_ha_state()
|
|
|
|
|
|
|
|
async def async_set_fan_mode(self, fan_mode):
|
|
async def async_set_fan_mode(self, fan_mode):
|
|
|
"""Set fan mode."""
|
|
"""Set fan mode."""
|
|
@@ -337,7 +337,7 @@ class SmartIRClimate(ClimateEntity, RestoreEntity):
|
|
|
|
|
|
|
|
if not self._hvac_mode.lower() == HVAC_MODE_OFF:
|
|
if not self._hvac_mode.lower() == HVAC_MODE_OFF:
|
|
|
await self.send_command()
|
|
await self.send_command()
|
|
|
- await self.async_update_ha_state()
|
|
|
|
|
|
|
+ self.async_write_ha_state()
|
|
|
|
|
|
|
|
async def async_set_swing_mode(self, swing_mode):
|
|
async def async_set_swing_mode(self, swing_mode):
|
|
|
"""Set swing mode."""
|
|
"""Set swing mode."""
|
|
@@ -345,7 +345,7 @@ class SmartIRClimate(ClimateEntity, RestoreEntity):
|
|
|
|
|
|
|
|
if not self._hvac_mode.lower() == HVAC_MODE_OFF:
|
|
if not self._hvac_mode.lower() == HVAC_MODE_OFF:
|
|
|
await self.send_command()
|
|
await self.send_command()
|
|
|
- await self.async_update_ha_state()
|
|
|
|
|
|
|
+ self.async_write_ha_state()
|
|
|
|
|
|
|
|
async def async_turn_off(self):
|
|
async def async_turn_off(self):
|
|
|
"""Turn off."""
|
|
"""Turn off."""
|
|
@@ -391,7 +391,7 @@ class SmartIRClimate(ClimateEntity, RestoreEntity):
|
|
|
return
|
|
return
|
|
|
|
|
|
|
|
self._async_update_temp(new_state)
|
|
self._async_update_temp(new_state)
|
|
|
- await self.async_update_ha_state()
|
|
|
|
|
|
|
+ self.async_write_ha_state()
|
|
|
|
|
|
|
|
async def _async_humidity_sensor_changed(self, entity_id, old_state, new_state):
|
|
async def _async_humidity_sensor_changed(self, entity_id, old_state, new_state):
|
|
|
"""Handle humidity sensor changes."""
|
|
"""Handle humidity sensor changes."""
|
|
@@ -399,7 +399,7 @@ class SmartIRClimate(ClimateEntity, RestoreEntity):
|
|
|
return
|
|
return
|
|
|
|
|
|
|
|
self._async_update_humidity(new_state)
|
|
self._async_update_humidity(new_state)
|
|
|
- await self.async_update_ha_state()
|
|
|
|
|
|
|
+ self.async_write_ha_state()
|
|
|
|
|
|
|
|
async def _async_power_sensor_changed(self, entity_id, old_state, new_state):
|
|
async def _async_power_sensor_changed(self, entity_id, old_state, new_state):
|
|
|
"""Handle power sensor changes."""
|
|
"""Handle power sensor changes."""
|
|
@@ -416,13 +416,13 @@ class SmartIRClimate(ClimateEntity, RestoreEntity):
|
|
|
else:
|
|
else:
|
|
|
self._hvac_mode = STATE_ON
|
|
self._hvac_mode = STATE_ON
|
|
|
|
|
|
|
|
- await self.async_update_ha_state()
|
|
|
|
|
|
|
+ self.async_write_ha_state()
|
|
|
|
|
|
|
|
if new_state.state == STATE_OFF:
|
|
if new_state.state == STATE_OFF:
|
|
|
self._on_by_remote = False
|
|
self._on_by_remote = False
|
|
|
if self._hvac_mode != HVAC_MODE_OFF:
|
|
if self._hvac_mode != HVAC_MODE_OFF:
|
|
|
self._hvac_mode = HVAC_MODE_OFF
|
|
self._hvac_mode = HVAC_MODE_OFF
|
|
|
- await self.async_update_ha_state()
|
|
|
|
|
|
|
+ self.async_write_ha_state()
|
|
|
|
|
|
|
|
@callback
|
|
@callback
|
|
|
def _async_update_temp(self, state):
|
|
def _async_update_temp(self, state):
|