I have a snippet of an automation that is used all over a particular yaml file.
action:
- service: humidifier.turn_off
entity_id: humidifier.midea
- delay:
seconds: 5
- service: humidifier.turn_on
…
…
I want to be able to use a variable instead of hard coding seconds 5
everywhere.
How can I create a variable mDelay
and inside the yaml file define it to be 10
(and easily change it again in the text file anytime I please), and then how can I use mDelay
in place of everywhere I hardcoded 5?
What I don’t want to do is create a Helper or other HA object and use the UI to set it. I want this all to exist inside the yaml file. You would think I’d have learned how to do this a long time ago.