Core: Scenes "color_name" attribute no longer recognized

Created on 1 Nov 2019  路  14Comments  路  Source: home-assistant/core


no errors reported in the log
Home Assistant release with the issue:

Last working Home Assistant release (if known):
100.3

Operating environment (Hass.io/Docker/Windows/etc.):

Docker
Integration:

https://www.home-assistant.io/integrations/scene/

Description of problem:

"color_name" attribute works when used from services in the developer console, but not when called from a saved scene in the config. With the brightness set to 100 and the color_name set to red, the lights will change to 100% but will not change color to red.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

name: Movies
entities:
  light.entertainment_area_1:
    state: on
    brightness: 100
    color_name: red

Traceback (if applicable):


Additional information:

Most helpful comment

This is not an "improvement" but rather a major breaking change, and in the wrong direction. Scenes were helpful for transitioning my lights to different levels of brightness. It was a nice shortcut instead of having to redo the changes in an automation. I guess I can use a script but....wish this had been noted better.

All 14 comments

transistion also no longer works

you must use device state attributes per the breaking changes..any attribute in the states panel will do. color_name and transition are not state attributes

Alright, so I guess the best way forward is to transform such scenes into scripts. See https://www.home-assistant.io/integrations/light/#service-lightturn_on for supported service attributes.

BEFORE

scene:
  - name: My Light Transition
      entities:
        light.living_room:
          state: on
          brightness: 100
          transition: 120

AFTER

script:
  my_light_transition:
    alias: My Light Transition
    sequence:
      - service: light.turn_on
        data:
          entity_id: light.living_room
          brightness: 100
          transition: 120

Blame #27182

i dont see how this is a improvement? #27182

Scenes are a declarative interface to reproduce a given state. Transition is not part of the state but instead explains how a state is to be achieved. The scene integration does not currently allow users to specify how to reproduce a state. If you have an idea on how this can be achieved in a way that fits in our architecture and are interested on working on this, open an architecture issue.

Going to close this as this is working as expected.

Scenes are a declarative interface to reproduce a given state. Transition is not part of the state but instead explains how a state is to be achieved. The scene integration does not currently allow users to specify how to reproduce a state. If you have an idea on how this can be achieved in a way that fits in our architecture and are interested on working on this, open an architecture issue.

Thanks for clarifying - this was the explanation I was looking for. I understand the motivation for these changes now.

This is not an "improvement" but rather a major breaking change, and in the wrong direction. Scenes were helpful for transitioning my lights to different levels of brightness. It was a nice shortcut instead of having to redo the changes in an automation. I guess I can use a script but....wish this had been noted better.

I agree that this should have been better communicated. We didn't realize that scenes could be used as scripts and that this was a feature that people relied upon. We didn't get any feedback about this during the beta either.

i have 40 switches that i call to turn off with node-red (in the scene)
because all my switches are rf base i don't know the state for them and using this scene make sure all will be off.
after the change, if i have few of them turn on manually hass don't know and still think they off so dont send the off command.

i change it to script but now it takes 35 seconds more then it was with scenes.
i don't think that you go over all the use cases for using the scene.
can you go back?

Is that just because with a script it goes sequentially so processing 30+ calls takes a while versus a scene calls everything together?

You can put multiple entity IDs in a single turn_on call in a script. Just make it a list.

But not if you want different transition times and brightness, or any other attribute.

Was this page helpful?
0 / 5 - 0 ratings