Skip to content

Commit

Permalink
Add 1 second to 'now' to attempt fixing daylight not switching proper…
Browse files Browse the repository at this point in the history
…ly when the time delta is 0
  • Loading branch information
zim514 committed May 3, 2024
1 parent f7f7677 commit 65606a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion script.service.hue/addon.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<addon id="script.service.hue" name="Hue Service" provider-name="zim514" version="2.0.6">
<addon id="script.service.hue" name="Hue Service" provider-name="zim514" version="2.0.7">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="script.module.requests" version="2.31.0"/>
Expand Down
2 changes: 1 addition & 1 deletion script.service.hue/resources/lib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def _task_loop(self):

while not self.settings_monitor.abortRequested() and not self.stop_timers.is_set(): #todo: Update timers if sunset offset changes.

Check warning on line 218 in script.service.hue/resources/lib/core.py

View workflow job for this annotation

GitHub Actions / Qodana for Python

Line is longer than allowed by code style

Line is longer than allowed by code style (\> 120 columns)

now = datetime.now()
now = datetime.now() + timedelta(seconds=1)
today = date.today()
# Convert self.morning_time to a datetime object #todo: Do this in settings.py, or something
morning_datetime = datetime.combine(today, self.settings_monitor.morning_time)
Expand Down

0 comments on commit 65606a4

Please sign in to comment.