nielsfaber / scheduler-component

Custom component for HA that enables the creation of scheduler entities
GNU General Public License v3.0
631 stars 41 forks source link

Improve handling of overlapping schedules #260

Closed j-f-d closed 1 year ago

j-f-d commented 1 year ago

Checklist

Background

I help to run a building where we run a number of clubs and other activities. So Club 1 might meet Friday at 5pm-7pm in room 1 then Club 2 might meet Friday 7pm-9pm and use rooms 1, 2 and 3.
So typically, we create a schedule entry for each club/event and schedule the heat to come on an hour or so before the actual event, then heat off at the end, so for room1, this would translate to be on at 4pm, off at 7pm and on at 6pm, off at 9pm. The problem is that the heating would go off at 7pm, when we want it still on.

Where the events are separated by more time, this method of scheduling is exactly what we want. But if for some reason a regular club isn't on one week, it can temporarily be turned of in the schedule, which is also why we don't just use a different schedule for each room to cover both clubs.

Proposal

If are overlapping schedules, with the later demanding heat, then a request from an earlier schedule to turn off should be ignored. Effectively the current heat setting should be the max of any concurrent schedules for a given entity.

Additional info

I think when the next even is the pending turn-off (which we don't want) the scheduler card should grey out the entry, and if possible give some indication that it is because it overlaps with another one.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days