Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brightness_pct is deprecated from scenes; what now? #33573

Closed
fermulator opened this issue Apr 3, 2020 · 5 comments
Closed

brightness_pct is deprecated from scenes; what now? #33573

fermulator opened this issue Apr 3, 2020 · 5 comments

Comments

@fermulator
Copy link

fermulator commented Apr 3, 2020

The problem

Per #33527 , it has become clear that brightness_pct is deprecated in scenes.

https://www.home-assistant.io/blog/2019/10/30/release-101/#breaking-changes

Scene - Scenes have to be configured more strictly from now on. Each entity must be configured with a valid state. Furthermore, the attributes that can be used must be device state attributes. This means that they should be listed under developer-tools -> states. - ([scene docs])

When I look at dev tools states, clearly brightness_pct is not listed.

So what is the equivalent replacement?
Why has it been deprecated and removed? (to be completely honest, this is a very annoying breakage of backwards compatibility) - I'd like to clearly understand the technical need or reason to "restrict scene states", for this trade off of functionality (there are a whole lot of other attributes lost...)

Brightness % is still a valid attribute for a light ...
https://www.home-assistant.io/integrations/light/

It is less usable if users have to compute a rough % themselves based on the 0-255 absolute value of brightness alone.

Environment

  • Home Assistant Core release with the issue: 0.107.7
  • Last working Home Assistant Core release (if known): pre 101
  • Operating environment (Home Assistant/Supervised/Docker/venv): python venv
  • Integration causing this issue: light entities in scene definition
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/scene

Problem-relevant configuration.yaml

example entry in scenes.yaml that worked fine before release 101

- name: Entertaining All Main On
  entities:
    light.main_floor:
      state: true
      brightness_pct: 100

Traceback/Error logs

Apr 02 07:21:34 hass hass[687]: 2020-04-02 07:21:34 WARNING (MainThread) [homeassistant.components.light.reproduce_state] The use of other attributes than device state 
attributes is deprecated and will be removed in a future release. Read the logs for further details: https://www.home-assistant.io/integrations/scene/

Additional information

Of course this particular example is specific to one thing. What about everything else for a light that a scene would clearly want to set or control? rgb_colour, white_value, etc

@balloob
Copy link
Member

balloob commented Apr 3, 2020

Use brightness. It goes from 0…255. Scenes work based on the state attributes, not based on the parameters you can pass to light.{turn_on/turn_off}

@balloob balloob closed this as completed Apr 3, 2020
@fermulator
Copy link
Author

fermulator commented Apr 4, 2020

@balloob , any chance there is a reference or explanation into why this backwards incompatibility was put in motion? Maybe some sort of technical reasoning?

"Scenes work based on the state attributes"

, this was not previously true, scenes worked fine before with "non-state attributes", and now being deprecated.

What about the other things like rgb_color, white_value, etc?

@fermulator
Copy link
Author

This makes no sense still.

When I visit: https://www.home-assistant.io/integrations/light/

I'm still getting the deprecation warning. The "State Attributes" on the light still include both brightness and brightness_pct sooo?

@frenck
Copy link
Member

frenck commented Oct 22, 2021

light state attributes are not the same things as scenes.

@jackgray
Copy link

jackgray commented Jan 20, 2023

3 years later is this true? have I just spent an entire f&(*ing day getting gaslit that I didn't JUST CHANGE THAT SETTING

you mean to tell me that it is not reasonable to expect dimming the lights to be a "scene change"??? THAT IS EVERYTHING to a room

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants