denysdovhan / ha-yasno-outages

⚡️ Yasno electricity outages (due to war in Ukraine) integration for Home Assistant.
MIT License
83 stars 9 forks source link

Improve check for intersecting intervals #17

Closed gentoo-root closed 3 months ago

gentoo-root commented 3 months ago

Handle the case when [start_date, end_date] lies entirely within [event_start, event_end], for example:

start_date = 1:00 end_date = 2:00 event_start = 0:00 event_end = 4:00

Ref: https://github.com/denysdovhan/ha-yasno-outages/pull/15#issuecomment-2250769033