I have multiple cameras and each camera notifies me on a separate tag so they don’t overwrite each other’s messages. However, I’m finding that this is making it difficult to write “message clearing” automations because there doesn’t seem to be a concise way to write multiple tag triggers into a single automation. I was able to collapse two event_types into a single event trigger (array) but when I try to list out the tag values (in an array) it no longer triggers on the event.
Right now, I have a trigger entry for each camera tag and this works:
Is that the best I can do? I’d really like to be able to do a single event trigger with a list of all tags or better yet use a wildcard/asterisk to match all cameras_event_greg_* tags. Is there a way to do that?
That’s why I avoid the UI editor like the plague. Strips all the comments, messes up the whole format and ordering.
Generally when using UI and YAML, I suggest creating the initial automation in the UI, then copy the code to another file and edit it in YAML.
I second this notion. I have all my automations broken out into separate packages based on their related function so the UI editor doesn’t work with them anyway. @scott.l.gamble, try hacking it into the file directly and don’t use the UI editor.
Then create a folder called packages in the same directory as configuration.yaml and in there create your yaml files by room, by component or whatever you like, e.g. bedroom.yaml and climate.yaml.
Now you can create automations in the UI and they will be stored in automations.yaml, then you copy the code from there once you are finished and then put it in the package you like and put automation: in the beginning, like this: