Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
wtom committed Jan 23, 2025
1 parent fe0211a commit c7b84c7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions custom_components/better_thermostat/calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,11 @@ def calculate_calibration_setpoint(self, entity_id) -> float | None:
return None

# Add tolerance check
_within_tolerance = self.tolerance > 0.0 and self.cur_temp >= (
self.bt_target_temp - self.tolerance
) and self.cur_temp <= (self.bt_target_temp + self.tolerance)
_within_tolerance = (
self.tolerance > 0.0
and self.cur_temp >= (self.bt_target_temp - self.tolerance)
and self.cur_temp <= (self.bt_target_temp + self.tolerance)
)

if _within_tolerance:
# When within tolerance, don't adjust calibration
Expand Down

0 comments on commit c7b84c7

Please sign in to comment.