Alexwijn / SAT

The Smart Autotune Thermostat (SAT) is a custom component for Home Assistant that works with an OpenTherm Gateway (OTGW).
GNU General Public License v3.0
75 stars 16 forks source link

Error doing job: Task exception was never retrieved (None) #56

Closed TimKrige closed 3 weeks ago

TimKrige commented 1 month ago

Based on the thread here, I have initiated a new SAT using the development branch and applied the settings recommended by Sergeant "D". I am running into a divide by zero error, please see log entry below. I have 6 climate entities (generic thermostats), SAT is in multiroom mode, underfloor heating. I can provide additional data as needed.

This error originated from a custom integration.

Logger: homeassistant Source: custom_components/sat/pwm.py:101 integration: Smart Autotune Thermostat (documentation, issues) First occurred: 14:41:44 (36 occurrences) Last logged: 14:57:20

Error doing job: Task exception was never retrieved (None) Traceback (most recent call last): File "/config/custom_components/sat/climate.py", line 866, in async_control_heating_loop await self.pwm.update(self._calculated_setpoint, self._coordinator.boiler_temperature) File "/config/custom_components/sat/pwm.py", line 67, in update self._duty_cycle = self._calculate_duty_cycle(requested_setpoint) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/sat/pwm.py", line 101, in _calculate_duty_cycle self._last_duty_cycle_percentage = (requested_setpoint - base_offset) / (boiler_temperature - base_offset)


ZeroDivisionError: float division by zero
sergeantd83 commented 1 month ago

Thanks for catching this bug. It was there since day one. Now is fixed!