ScratMan / HASmartThermostat

Smart Thermostat with PID controller for HomeAssistant
338 stars 49 forks source link

ZeroDivisionError #53

Closed papadi closed 2 years ago

papadi commented 2 years ago

After the last update my logs are flooded with this... :(

Logger: homeassistant Source: custom_components/smart_thermostat/climate.py:918 Integration: smart_thermostat (documentation, issues) First occurred: 10:43:16 PM (5 occurrences) Last logged: 10:43:17 PM

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/config/custom_components/smart_thermostat/climate.py", line 799, in _async_control_heating await self.set_control_value() File "/config/custom_components/smart_thermostat/climate.py", line 918, in set_control_value time_off *= self._min_on_cycle_duration.seconds / time_on ZeroDivisionError: float division by zero

ScratMan commented 2 years ago

The error in the code was so clear, I don't understand how I could miss it on my test environment. Thanks for testing, and sorry for the inconvenience.

papadi commented 2 years ago

No problem. It happens. Thx for the quick fix.