Setting up a scene

Hi there.

I’d like to set up a very simple scene consisting of two smart plugs (an AVM DECT200 and an IKEA Tradfri plug). I can switch both separately on and off.

According to the docs it should be as simple as going to scene editor, create a new scene using the wanted devices, put them in the state I want them (ON in my case) and that’s it.

My configuration.yaml reads like this

...
#Imports
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
...

and my scenes.yaml

- id: '1637609165620'
  name: Wohnzimmer
  entities:
    switch.ikea_steckdose_01:
      linkquality: 199
      power_on_behavior:
      update:
        state: idle
      update_available: false
      friendly_name: IKEA Steckdose 01
      state: 'on'
    switch.steckdose_2:
      device_locked: false
      locked: true
      friendly_name: Steckdose WZ
      icon: mdi:power-socket-eu
      state: 'on'
  icon: mdi:lamps

When I finally create a button card and try to switch my scene on I get an error saying something like “Error when calling the service scene/turn_off. Service not found”.

Can someone please help me and give me a hint on what I am doing wrong, where is my mistake?
Thank you in advance!

This is not a valid service call. First, it would be a ., not a /. Second, you are not able to “turn off” a scene. If you want to activate the scene, try scene.turn_on.

If you are still having trouble, can you post the YAML for your button card?

1 Like

Thank you for your answer.

This is no real command or so, it is the error message quoted from memory and translated into English.

The according button card:

type: button
tap_action:
action: toggle
entity: scene.wohnzimmer

All code I mentioned was created by HA, I’m still a beginner and learning :slightly_smiling_face:

you can’t toggle a scene. If you want a scene button…

type: button
entity: scene.wohnzimmer
tap_action:
  action: call-service
  service: scene.wohnzimmer
1 Like

I am very sorry I discovered your answer just now - my notification settings were somehow turned off :confused:
I will try your suggestion as soon as possible and provide a feedback!