nielsfaber / scheduler-component

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

Priority system #302

Closed sirkojon closed 9 months ago

sirkojon commented 9 months ago

Checklist

Proposal

Hi, recently I forked your repo and implemented a simple priority system in which you can specify a priority for each schedule. The main idea is that sometimes you want to quickly switch between schedule setups (e.g. leaving for vacation) and turn them back on afterwards. When schedule with higher priority is created (or enabled) it turns off lower priority schedules that operates on the same [1] entities. After it is disabled or deleted it turns the schedules that it previously disabled back on. I also made the necessary changes in the scheduler-card. Would you be interested in adding such thing to your project?

[1] Lower schedules are affected if their entities are subset of the higher priority schedule entities (so you can affect multiple schedules with a single higher priority schedule).

devildant commented 9 months ago

Hi, I'm not a dev on this project, but you can already do it with the conditions and either an input_boolean if you only have 2, or with an input_number if several

exemple in my case :

image

"Chauffage Salon : Present" activates when I'm at home and if I'm away it's "Chauffage Salon : Absent", both are on the same time slot

image