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

Attributes to add to light #25

Open
vsmith80 opened this issue Oct 13, 2023 · 1 comment
Open

Attributes to add to light #25

vsmith80 opened this issue Oct 13, 2023 · 1 comment

Comments

@vsmith80
Copy link

Well, the feature to remember previos state is pretty cool! I have one complicated automatization to make light switch to previos state when i'm pressing the switch. And i tried to check new feature
I have scene "Kitchen duty light", "Kitchen usual light" and "Kitchen no light". When duty light is truned on pressing the switch makes usual light active, and the next press to switch makes active prevous scene.

So i'm truning on "Restore on deactivate" on switch of scene "Kitchen usual light"
And the light not turning back to last state exactly.

When "Kithen duty light" is activated my lamp looks like that:

=============Duty light

color_mode: color_temp
brightness: 13
color_temp_kelvin: 2000
color_temp: 500
hs_color:
  - 30.601
  - 94.547
rgb_color:
  - 255
  - 136
  - 13
xy_color:
  - 0.599
  - 0.382
raw_state: true
icon: mdi:wall-sconce-flat
friendly_name: Kitchen lamp
supported_features: 23

Activating the usual light scene turns it to that:

============ Usual light

color_mode: color_temp
brightness: 255
color_temp_kelvin: 2433
color_temp: 411
hs_color:
  - 29.057
  - 75.004
rgb_color:
  - 255
  - 156
  - 63
xy_color:
  - 0.554
  - 0.389
raw_state: true
icon: mdi:wall-sconce-flat
friendly_name: Kitchen lamp
supported_features: 23

Deactivating the usual light switch makes it not to first state, but to that

color_mode: hs
brightness: 255
hs_color:
  - 30
  - 94.9
rgb_color:
  - 255
  - 134
  - 13
xy_color:
  - 0.602
  - 0.38
raw_state: true
icon: mdi:wall-sconce-flat
friendly_name: Kitchen lamp
supported_features: 23

As far i can see somehow color_mode attribute is changing, and hs state of that attribute have no brightness, color_temp_kelvin and color_temp

So' maybe it's possible to save color_mode attribute?

@hugobloem
Copy link
Owner

Hi,

I also noticed that the integration doesn't always restore to the expected state of the lights. I suspect this might be due to transitions being saved as states to which the entity is restored.

I don't think the colour mode is influencing anything here. Colour mode simply tells us what mode is used to set the colour of a light. Since this integration only sets lights according to their RGB value this shouldn't change anything.

I will look into this and see what I can do.

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

2 participants