HADashboard switch to trigger scene

Hello, for the last couple of days I’ve been trying to figure out how to get my HADashboard switch to turn a light scene I created on and off with a press of the button. Any suggestions? Thanks!

Are you using the scene widget?

Scenes can only be switched on, not off again, there is no notion of turning a scene off, you merely replace it with another scene.

On the dash I have a widget switch set up and then in the configuration.yaml I have a normal scene and a scene for the effect I want. What I’m trying to figure out is ihow to get the dash widget to trigger the scenes? Maybe there’s a much easier way to go about this? Thank you for the quick reply!

You need 2 scene widgets on the dash, one for each scene.

or you create an automation and let an input boolean switch between the 2 scenes.
then you can use the input_boolaen in the dashboard to switch between 2 scenes.

I had the same issue not too long ago. I started out I was using the input_boolean method Rene described. But things get out of sync and its not pretty all the time…I then learned how easy it is to just use scripts and call the scripts. Much cleaner I think. Just take your scene and move it to service calls in scripts, it actually give you more options. Just use the home assistant.toggle or light.toggle. One thing I haven’t found that I would like (haven’t really looked yet either) is to be able to include the transition time in the scripts…

*Edit to format

Couple examples…

downstairslights:
  alias: Downstairs Lights
  sequence:
    service: homeassistant.toggle
    entity_id:
      - light.bar
      - light.game_room
      - light.home_theater

movie_downstairs:
  alias: "Watch Movie Downstairs"
  sequence:
    - service: homeassistant.turn_on
      entity_id:
        - scene.hometheater
    - service: script.say_sonos
      data_template:
        volume: '0.4'
        where: 'living_room, media_player.basement, media_player.bedroom'
        what: "Setting up the Basement Home Theater, Enjoy your Movie"
    - delay: 30
    - service: script.basementtv