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

Lidl lights (based on Tuya TS0502A) - incorrect color temperature and minimal brightness #8862

Open
all43 opened this issue Feb 21, 2025 · 1 comment

Comments

@all43
Copy link

all43 commented Feb 21, 2025

Issue: Incorrect Color Temperature and Brightness Handling for Lidl TS0502A Lights

Setup Details

I've just set up Home Assistant with Zigbee2MQTT (version 2.1.1-dev, commit: 40f4147), installed as an HA add-on.

I have three types of Lidl white lights with adjustable color temperature:

All of these are supported by Zigbee2MQTT as whitelabel variations of Tuya TS0502A.


Issue 1: Incorrect Color Temperature Mapping

When setting the color temperature via the Zigbee2MQTT web interface, I can't achieve the actual warmest temperature. Here’s what happens:

  • NEUTRAL (default mid-point) appears to be the warmest I can get, but still far away from warm device capable of.
  • COOLEST (130) is actually warmer than COOL (250).
  • WARMEST (500) produces the same color as COOL (250) instead of getting warmer.
  • Both COOL and WARMEST in Zigbee2MQTT match the coldest setting from the Lidl Home app.

Initially, I thought this was a range issue, but since COOLEST (130) is warmer than COOL (250), and WARMEST (500) is the same as COOL, it seems like an incorrect conversion.


Issue 2: Minimum Brightness handled incorrectly

  • When setting brightness value less than 3, the device ignores brightness value, actual brightness remains at the same level as it was before
  • If I set brightness to 0, the state changes to off, but the light remains on, brightness doesn't change as well.
  • With brightness set to 3 device minimum brightness matches the one I could achieve with vendor app
  • Regarding maximum brightness I'm not sure - I see no visual difference above 220 (for instance 255 looks the same for my eyes, but I don't have hardware to measure), however values aren't ignored so might be it is working as intended.

Request for Guidance

I don't have prior experience with zigbee-herdsman-converters or even with Home Assistant itself, so I’m unsure where to start.

  • For the color temperature issue, could this be a matter of min/max mired values being inverted or incorrectly scaled?
  • For the brightness issue, I don't know how to limit minimum value. I also not sure if the device should actually switch off when the value set to zero.

I’d love to help fix this, but I need guidance on which part of the codebase to look into. Any pointers would be greatly appreciated!


Additional Notes

I have access to the physical hardware and can test/debug any suggested changes.

@all43 all43 changed the title Lild lights (based on Tuya TS0502A) - incorrect color temperature and minimal brightness Lidl lights (based on Tuya TS0502A) - incorrect color temperature and minimal brightness Feb 21, 2025
@all43
Copy link
Author

all43 commented Feb 21, 2025

I've experimented with color temperature values. Seems that device scale is non standard and doesn't use mireds.
My results:

  • 0 WARMEST
  • 255 COOLEST
  • 256 - WARMEST again, which probably means it is overflowing, resulting zero again. Also explains why 250 and 500 looks identical and why warmest values I could get were somewhere in the middle.

So now I want to figure out how to make herdsman to use 0-255 scale instead of mireds

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

1 participant