Inconsistent scene behaviour

I made the scene as shown below, intended to switch all my lights in a room. I have a mixture of Sonoff, Tuya and KaKu devices (controlled by RFLink). All entities can be controlled without problems from the HA dashboard and with “header toggle” I can switch on/off all entities without problem.

However when I make an automation like:

- id: '1641248426939'
  name: All Off
  entities:
    switch.kastlichten_socket_1:
      device_class: outlet
      friendly_name: Kastlichten Socket 1
      state: 'off'
    switch.piano:
      friendly_name: Piano
      state: 'off'
    light.1000fc883e:
      restored: false
      supported_features: 4
      friendly_name: Tafellamp
      supported_color_modes:
      - brightness
      state: 'off'
      brightness: 2
    light.10011071e5:
      restored: false
      supported_features: 4
      friendly_name: Salontafel
      supported_color_modes:
      - brightness
      state: 'off'
      brightness: 254
    light.g125_gold:
      min_mireds: 153
      max_mireds: 500
      supported_color_modes:
      - brightness
      - color_temp
      - onoff
      color_mode: color_temp
      brightness: 21
      color_temp: 370
      hs_color:
      - 28.391
      - 65.659
      rgb_color:
      - 255
      - 166
      - 87
      xy_color:
      - 0.526
      - 0.387
      friendly_name: G125 Gold
      supported_features: 0
      state: 'off'
    light.g125_gold_2:
      min_mireds: 153
      max_mireds: 500
      supported_color_modes:
      - brightness
      - color_temp
      - onoff
      color_mode: color_temp
      brightness: 21
      color_temp: 370
      hs_color:
      - 28.391
      - 65.659
      rgb_color:
      - 255
      - 166
      - 87
      xy_color:
      - 0.526
      - 0.387
      friendly_name: G125 Gold 2
      supported_features: 0
      state: 'off'
  icon: mdi:lightbulb-group-off

I get erratic behavior and sometimes it works other times some of the entities don’t switch to off or HAS status indicates “off” but lamp is still “on”.

Any suggestions? I would like to try to put a delay between the switching of the entities but cannot figure out how to do this.

That‘s a scene, not an automation and the scene generator UI is not very helpful, as it saves every entity attribute in it‘s current state.

Remove everything but the state: 'off' line per entity.

1 Like

Sorry, you are right this is the scene of my automation. I followed your advise and cleaned out all the crap the scene generator adds and as far as I can see it now it all works great. Thanks a lot for great advise!

Removing all the ‘junk’ worked for me as well.

Now I have the same Problem! :smirk:

But removing the junk doesn’t work…

I got 7 KNX Lamps with color Temperature.

Controlling a single one works very well!

But Scenes do crazy things! Sometime all work, but most time one or more lamps not working. Sometimes double clicking works…

Problem is in HomeAssistant, because in ETS I see the same.
When I write a Scene in NodeRed, it works perfectly!

Really bad for me, because I like the scene generator!

If there is no fix, I have to program all my scenes in Nodered and use HA only as a Remote.

I Hope somebody can help me?! :blush:

Thanks before and Merry Christmas! :christmas_tree:

Scenes in HA recall entity states. They don’t call Knx scene numbers. If you want that, try to use a button or script (or Knx scene entity maybe) and integrate it to your HA Scene.

Thanks for fast reply!

I’m not sure if I understand right…

I got for every Lamp 3 Group addresses.

2/2/0 - State 1.001 ON/OFF
2/2/1 - Value 5.001 %
2/2/2 - Temp 7.600 Absolute Color Temperature in K

In my knx.yaml i implementet like this:

  - name: "Schreibtisch"
    address: "2/2/0"
    brightness_address: "2/2/1"
    color_temperature_address: "2/2/2"
    color_temperature_mode: absolute
    min_kelvin: 2700
    max_kelvin: 6500

This entity I put into dashboard with mushroom card:

Now I want to program a scene in HA for different light states.
So I don’t use KNX-scenes.

I only want to change the upper parameters.

Do you understand?

Thanks!! :grinning:

No Idea? :wink: