Using a switch in a scene doesn't work

Hello,

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

- name: Scene1
  entities:
    switch.tv:
      state: on

And:

- name: Scene1
  entities:
    switch.tv: 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?