Skip to content

Commit

Permalink
Merge pull request #17 from gentoo-root/fix-intervals
Browse files Browse the repository at this point in the history
Improve check for intersecting intervals
  • Loading branch information
denysdovhan authored Jul 27, 2024
2 parents 5a79af2 + 041cdba commit c6e46bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/yasno_outages/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ def get_events(
if (
start_date <= event_start <= end_date
or start_date <= event_end <= end_date
# Include events that intersect beyond the timeframe
# See: https://github.com/denysdovhan/ha-yasno-outages/issues/14
or event_start <= start_date <= event_end
or event_start <= end_date <= event_end
):
events.append(
{
Expand Down

0 comments on commit c6e46bd

Please sign in to comment.