Skip to content

Commit

Permalink
fix auto-temperature.py script *again* (#24)
Browse files Browse the repository at this point in the history
It looks like after refactoring the code in #23, I just returned the original problem.
  • Loading branch information
zefr0x authored May 12, 2024
1 parent 79b8968 commit 0e23317
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/auto-temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def mk_time(hours, minutes, seconds=0):
temp = (DAWN_TIME - current_time) * (TEMP_NIGHT - TEMP_DAY) / WINDOW + TEMP_DAY
elif DUSK_TIME - WINDOW < current_time < DUSK_TIME:
temp = (DUSK_TIME - current_time) * (TEMP_DAY - TEMP_NIGHT) / WINDOW + TEMP_NIGHT
elif current_time > DUSK_TIME or current_time < DAWN_TIME:
elif current_time >= DUSK_TIME or current_time < DAWN_TIME:
temp = TEMP_NIGHT
elif current_time > DAWN_TIME or current_time < DUSK_TIME:
elif current_time >= DAWN_TIME or current_time < DUSK_TIME:
temp = TEMP_DAY

if temp:
Expand Down

0 comments on commit 0e23317

Please sign in to comment.