Skip to content

Commit

Permalink
Fix number error. #838
Browse files Browse the repository at this point in the history
  • Loading branch information
theyosh committed Oct 7, 2023
1 parent 442ab72 commit b59d26c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion terrariumArea.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ def update(self, read_only=False):
if "sensors" in self.setup and len(self.setup["sensors"]) > 0:
# Change the sensor limits when changing from day to night and vs.
if old_is_day != self.state["is_day"] and self.setup.get("day_night_difference", 0) != 0:
difference = float(self.setup["day_night_difference"]) * (-1.0 if self.state["is_day"] else 1.0)
difference = float(self.setup.get("day_night_difference", 0)) * (-1.0 if self.state["is_day"] else 1.0)
logger.info(
f'Adjusting the sensors based on day/night difference. Changing by {difference} going from {("day" if old_is_day else "night")} to {("day" if self.state["is_day"] else "night")}'
)
Expand Down

0 comments on commit b59d26c

Please sign in to comment.