Smart Home Automation Forum

Full Version: USING global VARIABLE IN yaml code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I want to use the same input (telecommand) to open a gate, and after to close it. 

how can I define a boolean variable (VAR1 for instance)  and test it to know if the gate is open or closed ?

I need to use this variable in several scripts. can you give me the syntax of the command to write, and in what .yaml file to use :  configuration.yaml ? or automation.yaml ? (joined)  or others ?

Thank's for your help
not need to config in yaml. just add a binary sensor for detect door, create AUTOMATION in home assistant: IF digital input=true THEN xxxxxxx