ScratMan / HASmartThermostat

Smart Thermostat with PID controller for HomeAssistant
345 stars 50 forks source link

HA Restart Integral should be a float #12

Closed benlbrm closed 2 years ago

benlbrm commented 2 years ago

Hello, When restart HA, I have this error:

`Logger: homeassistant.components.climate Source: custom_components/smart_thermostat/pid_controller/init.py:74 Integration: Thermostat (documentation, issues) First occurred: 22:00:56 (4 occurrences) Last logged: 22:00:56

Error adding entities for domain climate with platform smart_thermostat Error while setting up smart_thermostat platform for climate Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 607, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 714, in add_to_platform_finish await self.async_added_to_hass() File "/config/custom_components/smart_thermostat/climate.py", line 295, in async_added_to_hass self.pidController.integral = self.i File "/config/custom_components/smart_thermostat/pid_controller/init.py", line 74, in integral assert isinstance(i, float), "Integral should be a float" AssertionError: Integral should be a float`

There is no influence in my case cause Integral part is configured in yaml and not reloaded from a previous state.

ScratMan commented 2 years ago

Bug already fixed in release 2021.11.7. Please update.

benlbrm commented 2 years ago

Ok thanks sorry for that ;-)

ScratMan commented 2 years ago

You're welcome. I'm fine with people finding and reporting bugs. It means my work is useful, and it helps to improve. Just hope I won't receive 1k issue per week later on :sweat_smile: