Skip to content

Commit

Permalink
Fix #16
Browse files Browse the repository at this point in the history
  • Loading branch information
virtualdj committed Nov 3, 2023
1 parent dcff673 commit 2d4d101
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions custom_components/pun_sensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,9 @@ def get_fascia(dataora: datetime) -> Tuple[int, datetime]:
fascia = 3

# Prossima fascia: alle 7 di un giorno non domenica o festività
prossima = (dataora + timedelta(days=1)).replace(hour=7,
prossima = dataora.replace(hour=7,
minute=0, second=0, microsecond=0)
while ((prossima in holidays.IT()) or (prossima.weekday() == 6)):
while ((prossima <= dataora) or (prossima in holidays.IT()) or (prossima.weekday() == 6)):
prossima += timedelta(days=1)

else:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/pun_sensor/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"issue_tracker": "https://github.com/virtualdj/pun_sensor/issues",
"loggers": ["pun_sensor"],
"requirements": ["holidays", "bs4"],
"version": "0.4.0"
"version": "0.4.1"
}

0 comments on commit 2d4d101

Please sign in to comment.