nielsfaber / scheduler-component

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

Assign labels to schedules #400

Open jlaffaye opened 1 day ago

jlaffaye commented 1 day ago

Proposal

I wish to be able to assign labels to schedules. The end goal being that the switch entity for this schedule will also have this label. I will then be able to switch on/off a group of schedules based on labels.

Example use case: my energy provider has "peak events" that are not predictable and thus can not be handle in one schedule. I have two schedules: one for "standard" mode and one for "peak" mode (almost always off). I want to setup an automation to turn off all "standard" schedules when a peak event starts, and turn on all "peak" schedules. At the end of the peak event, do the opposite.

romainrossi commented 1 day ago

It seems it is already possible to assign Tags in the Entity panel image

However, trying to switch on/off the Schedules with the "generic_turn_on"/off or the "switch turn on/off" actions doesn't do anything when targeting the Tag (while it works for "normal" switches having the same tag; and it work if the action targets directly the entity).

When the tag is expanded, the scheduler aren't listed : image image