Skip to content

Commit

Permalink
Relax the AT_SETPOINT status
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexwijn committed Jan 13, 2025
1 parent fb123cb commit e58ad90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/sat/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,15 @@ def device_status(self):

return DeviceStatus.OVERSHOOT_HANDLING

if self.setpoint == self.boiler_temperature:
if abs(self.setpoint - self.boiler_temperature) <= DEADBAND:
return DeviceStatus.AT_SETPOINT

if self.boiler_temperature > self.setpoint:
if self.flame_active:
if self._boiler_temperature_tracker or self._is_flame_recent_or_cold_temperature_is_higher():
return DeviceStatus.COOLING_DOWN

if self.boiler_temperature - 2 == self.setpoint:
if abs((self.boiler_temperature - 2) - self.setpoint) <= DEADBAND:
return DeviceStatus.OVERSHOOT_STABILIZED

return DeviceStatus.OVERSHOOT_HANDLING
Expand Down

0 comments on commit e58ad90

Please sign in to comment.