Using a switch in a scene doesn't work


I am trying to turn a switch on (defined in switch.yaml) when activating a scene. This is what I tried:

- name: Scene1
      state: on


- name: Scene1
  entities: on

However, both don’t switch on when activating the scene. How can I fix this?

Are you sure the switch entity id is correct (look in the developer tools states panel)?

Did you restart Home Assistant after creating the scene?

Can you post your full scenes.yaml?