Skip to content

Commit

Permalink
ha - fix offset
Browse files Browse the repository at this point in the history
  • Loading branch information
ph4r05 committed Aug 25, 2024
1 parent d286da9 commit f0b4608
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ph4ha/apps/blinds.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def update_blind_dusk_automation_enabled(self, entity=None, attribute=None, old=

def on_dusk_recompute(self):
try:
total_offset = datetime.timedelta(hours=12 - self.dusk_offset.hour, minutes=self.dusk_offset.minute)
total_offset = datetime.timedelta(hours=self.dusk_offset.hour - 12, minutes=self.dusk_offset.minute)
adjusted_dusk_time = self.next_dusk_time + total_offset
self.log(f"Scheduling event for dusk at {adjusted_dusk_time} with offset of {total_offset}.")

Expand Down

0 comments on commit f0b4608

Please sign in to comment.