basnijholt / adaptive-lighting

Adaptive Lighting custom component for Home Assistant
https://basnijholt.github.io/adaptive-lighting/
Apache License 2.0
1.81k stars 134 forks source link

Kelvin doesn't go below 2500k when set to 2200k and bulb supports it. #694

Closed IIV-NATHAN-VII closed 1 year ago

IIV-NATHAN-VII commented 1 year ago

Home Assistant Adaptive Lighting Issue Template

Even though I set lowest to 2200k and sleep mode to 2200k, it never drops below 2500k, works fine in Tapo app (using tapo bulbs).

Bug Reports

If you need help with using or configuring Adaptive Lighting, please open a Q&A discussion thread here instead.

Before submitting a bug report, please follow these troubleshooting steps:

Please confirm that you have completed the following steps:

Required information for bug reports:

Please include the following information in your issue.

Issues missing this information may not be addressed.

  1. Debug logs captured while the issue occurred. See here for instructions on enabling debug logging:
  1. Your Adaptive Lighting configuration:
  1. (If using Zigbee2MQTT), provide your configuration files (remove all personal information before posting):
    • devices.yaml
    • groups.yaml
    • configuration.yaml ⚠️; Warning REMOVE ALL of the PERSONAL INFORMATION BELOW before posting ⚠️;
      • mqtt: server:
      • mqtt: user:
      • mqtt: password:
      • advanced: pan_id:
      • advanced: network_key:
      • anything in log_syslog if you use this
    • Brand and model number of problematic light(s)


4.  Describe the bug and how to reproduce it:

5. Steps to reproduce the behavior:
basnijholt commented 1 year ago

Are you sure your light has that in the attributes?

What does it report in the Developer Tools attributes?

e.g.,:

image

K = 1000000 / mired

So for me, taking:

min_mireds: 150
max_mireds: 500

minimum: 1000000 / 500 = 2000 K

Can you check your values?

IIV-NATHAN-VII commented 1 year ago

How odd, it shows the min as 2500, I wonder if it's a limitation of the Tapo integration I'm using

min_color_temp_kelvin: 2500
max_color_temp_kelvin: 6500
min_mireds: 153
max_mireds: 400
supported_color_modes:
  - brightness
  - color_temp
  - hs
  - onoff
friendly_name: Living
supported_features: 0
color_mode: color_temp
brightness: 255
color_temp_kelvin: 2906
color_temp: 344
hs_color:
  - 27.987
  - 59.51
rgb_color:
  - 255
  - 174
  - 103
xy_color:
  - 0.505
  - 0.385
IIV-NATHAN-VII commented 1 year ago

So I just did an override in my config:

homeassistant: customize_domain: light: min_color_temp_kelvin: 2200 max_color_temp_kelvin: 6500

Shows in Developer Attributes. min_color_temp_kelvin: 2200 max_color_temp_kelvin: 6500 min_mireds: 153 max_mireds: 400 supported_color_modes:

Still only sets 2500.

basnijholt commented 1 year ago

I think this is due to the max_mireds: 400, you should set that to

max_mireds = 1000000 / 2200 = 454

This is because Home Assistant computed the min_color_temp_kelvin based on the mireds (I believe).

IIV-NATHAN-VII commented 1 year ago

After a bit of digging I think it's something else, I can see it changing on the Tapo app when I toggle sleep mode on/off, I can also see it sending 2200K in the log now, but my bulbs don't seem to want to go below 2500k unless set in the app, I will check the Tapo integration, thank you for your time.

IIV-NATHAN-VII commented 1 year ago

Can I ask, if I put all my bulbs in a group and 2 of my 10 bulbs only go to 2500k (not 2200), would that also limit the others to 2500k?

Thanks.

IIV-NATHAN-VII commented 1 year ago

@basnijholt

basnijholt commented 1 year ago

If you put them in a Home Assistant light group, AL will expand them and treat them separately. So it won't limit the others.