Skip to content

Commit 9376d1c

Browse files
authored
Merge pull request #156 from Chupaka/fix_await_self.async_write_ha_state
Remove `await` in front of self.async_write_ha_state() calls
2 parents 9adaccb + ea09cd3 commit 9376d1c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

custom_components/smart_thermostat/climate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ async def clear_integral(self, **kwargs):
787787
"""Clear the integral value."""
788788
self._pid_controller.integral = 0.0
789789
self._i = self._pid_controller.integral
790-
await self.async_write_ha_state()
790+
self.async_write_ha_state()
791791

792792
@property
793793
def min_temp(self):
@@ -877,7 +877,7 @@ async def _async_control_heating(self, time_func=None, calc_pid=False):
877877
data = {ATTR_ENTITY_ID: self._heater_entity_id,
878878
ATTR_VALUE: self._control_output}
879879
await self.hass.services.async_call(NUMBER_DOMAIN, SERVICE_SET_VALUE, data)
880-
await self.async_write_ha_state()
880+
self.async_write_ha_state()
881881
return
882882

883883
if self._sensor_stall != 0 and time.time() - self._last_sensor_update > \
@@ -887,7 +887,7 @@ async def _async_control_heating(self, time_func=None, calc_pid=False):
887887
elif calc_pid or self._sampling_period != 0:
888888
await self.calc_output()
889889
await self.set_control_value()
890-
await self.async_write_ha_state()
890+
self.async_write_ha_state()
891891

892892
@property
893893
def _is_device_active(self):

0 commit comments

Comments
 (0)