From 00dd6e53a002a09df973b21b4b2c609a8f9fc880 Mon Sep 17 00:00:00 2001 From: MapoDan <42698485+MapoDan@users.noreply.github.com> Date: Tue, 9 Jan 2024 16:38:08 +0100 Subject: [PATCH] Changes to be committed: modified: custom_components/programmable_thermostat/climate.py removed await since self.async_write_ha_state is not an async function --- custom_components/programmable_thermostat/climate.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/custom_components/programmable_thermostat/climate.py b/custom_components/programmable_thermostat/climate.py index 6daebae..6416c8e 100755 --- a/custom_components/programmable_thermostat/climate.py +++ b/custom_components/programmable_thermostat/climate.py @@ -273,7 +273,7 @@ async def _async_turn_on(self, mode=None): if not self._is_device_active_function(forced=False) and self.is_active_long_enough(mode=mode): self._set_hvac_action_on(mode=mode) await self.hass.services.async_call(HA_DOMAIN, SERVICE_TURN_ON, data) - await self.async_write_ha_state() + self.async_write_ha_state() async def _async_turn_off(self, mode=None, forced=False): """Turn heater toggleable device off.""" @@ -293,7 +293,7 @@ async def _async_turn_off(self, mode=None, forced=False): if self._is_device_active_function(forced=forced) and self.is_active_long_enough(mode=mode): self._set_hvac_action_off(mode=mode) await self.hass.services.async_call(HA_DOMAIN, SERVICE_TURN_OFF, data) - await self.async_write_ha_state() + self.async_write_ha_state() async def async_set_hvac_mode(self, hvac_mode): """Set hvac mode.""" @@ -320,7 +320,7 @@ async def async_set_temperature(self, **kwargs): return self._target_temp = float(temperature) await self.control_system_mode() - await self.async_write_ha_state() + self.async_write_ha_state() async def _async_sensor_changed(self, event): """Handle temperature changes.""" @@ -329,7 +329,7 @@ async def _async_sensor_changed(self, event): return self._async_update_temp(new_state.state) await self.control_system_mode() - await self.async_write_ha_state() + self.async_write_ha_state() async def _async_target_changed(self, event): """Handle temperature changes in the program.""" @@ -340,7 +340,7 @@ async def _async_target_changed(self, event): if self._hvac_mode == HVACMode.HEAT_COOL: self._async_restore_program_temp() await self.control_system_mode() - await self.async_write_ha_state() + self.async_write_ha_state() async def _async_control_thermo(self, mode=None): """Check if we need to turn heating on or off."""