Virtual Switches for Dashboard?

Hey all -

I’m used to creating virtual switches and using them on a dashboard for various things to trigger off of. For example, I had a virtual switch called “Mute for 5m” and when I pushed that on the dashboard to turn it on, Alexa would not announce the garage door opening or anything else like that until that virtual switch was off. (It was set to turn off automatically after 5m).

What do I use in HA to do something similar? I need one for my garage door that I can use a relay and door contact switch together with. Anyone have any suggestions on that one?

Go to “configuration --> helpers”

1 Like

Simple answer. I’ll go take a look, thank you for taking the time and pointing it out for me!

And this is what I use:

switch:
  - platform: template
    switches:
      dummy:
        value_template: "{{ is_state('input_boolean.master_switch', 'on') }}"
        turn_on:
          - service: input_boolean.turn_on
        turn_off:
          - service: input_boolean.turn_off
        icon_template: >-
          {% if is_state('input_boolean.master_switch', 'on') %}
            mdi:toggle-switch
          {% else %}
            mdi:toggle-switch-off
          {% endif %}

And then I use it in lovelace:

  - title: MasterSwitch
    path: masterswitch
    cards:
      - type: entity-button
        entity: input_boolean.master_switch
        icon: 'mdi:key-variant'

And do whatever I see fit with it…
image

But I guess configuration–>helpers will do just as fine
I just found out my switch popped up there (as my switch is pre-helper config era :stuck_out_tongue: )
image