Trying to get a button on my dashboard to control my garage door, depending on the state it is in.
I have a template sensor named “garagedoor_statesensor” which has three possible states: open, closed, ventilation
If the state is “closed” I want the button to toggle switch1 on tap, and switch2 on double tap.
If state is “open” I want the button to toggle switch1 on tap, and switch2 on double tap.
If state is “ventilation” I want the button to toggle switch2 on tap, and switch1 on double tap.
I simply can’t get my head around the script and the involvement of two switches - anyone with any pointers?
The button as it is right now, when it only activates switch1, regardless of sensor-state
- type: custom:button-card
entity: switch.garage_portabner_switch1
show_name: false
show_icon: false
tap_action:
action: toggle
style:
top: 49.3%
left: 20.2%
styles:
card:
- width: 115px
- height: 15px
- opacity: 0