so I must make an automation for every sensor ? that’s sounds bad.
would it possible in future to add regex or wild-cards ? would make some thinks a lot easier. I don’t know if there is already a discussion or more infos about that for hassio
Notifications for example or battery low alarm (I have over 20 different devices that have a battery reading). I have a few more ideas where this is useful.
Thats a way but I think not the best. implement wild-cards or something simliar would make much more possibilities. and safes resources because I don’t need to run x services for such things.
I find node red to be the best automation for me. So much easier to debug and test with.
Ok. But that doesn’t currently exist and people have been asking for it for years…so unless you’re going to add it in, you’re going to have to be open to alternative options.
No, you can use one automation that is triggered by multiple sensors. However, you must identify the sensors (see the example provided by jazzyisj).
I think I understand the advantage of supporting a wild-card. If in the future you were to add a new sensor called ‘TS Something’ then the automation would automatically include it because it triggers for any sensor name beginning with the letters ‘TS’.
Currently, there is no support for wild-cards anywhere in Home Assistant. If you want it, search the Feature Requests section of this forum for an existing request for it (if any) and vote for it or create a new request.
There is another way to do it that almost exists in Home Assistant. Currently you can create a group of sensors. What doesn’t exist is the ability for Home Assistant to monitor the group’s sensors for state-changes. It almost exists because there is a function called expand which expands groups into their individual group-members. So the automation’s trigger would look something like this:
However, currently this will not monitor the states of the members of group.windows but the state of the group itself. If you would like to see it use the members of the group, you may wish to cast a vote for this Feature Request to have it work that way.