I like to use a input switch to control my mower. In order to have one automation, I like to trigger that automation when the switch changes, no matter to or from what state. How do I do this (in one automation)? By the way, I ask this also because it seems not to work when I add multiple triggers for the same device.
Don’t supply a to: or from: state and the state trigger will trigger on all changes of sate (including attributes).Then use chooseactions to progress through your flow chart.
You didn’t mention what kind of integration you are using for your mower or the names of the entities involved … so I made them up to provide you with an example. If you supply the missing information, I can update the automation with the correct entities and service calls.
Thank you for your answer. I have thought about that too, but is seems mandatory to add a data block to the trigger. here is my code. As you can see, an error is shown that blocks the script from beĂŻng saved (YAML editing mode).
Seriously? What you marked as the Solution has nothing to do with the questions in your first post (which concerned itself with multiple triggers, and from and to options, not with how to properly call a service).
Seems like you don’t understand Home Assistant’s terminology. That’s a data option for a service call, not a trigger.
Seriously, @pdwonline, please mark @123’s post as the solution to your question rather than mine. Mine was just a follow-on correction on a minor point that emerged once you’d given us the info we needed.