Skip to content

Commit e520863

Browse files
committed
Heat if required after a restart. Fixes #41
1 parent 5bb9e18 commit e520863

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

custom_components/smart_thermostat/climate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def __init__(self, **kwargs):
302302
self._lookback = kwargs.get('lookback').seconds
303303
self._noiseband = kwargs.get('noiseband')
304304
self._sensor_entity_id = kwargs.get('sensor_entity_id')
305-
self._time_changed = time.time()
305+
self._time_changed = 0
306306
self._last_sensor_update = time.time()
307307
if self._autotune != "none":
308308
self._pidController = None
@@ -389,6 +389,7 @@ def _async_startup(event):
389389
# Set default state to off
390390
if not self._hvac_mode:
391391
self._hvac_mode = HVAC_MODE_OFF
392+
await self._async_control_heating(calc_pid=True)
392393

393394
@property
394395
def should_poll(self):

0 commit comments

Comments
 (0)