Hi @johan_bendz
I’ve identified an issue with the color temperature handling for the RGB Ceiling Light in the Lidl Smart Home app. Specifically, I’m referring to the light with model ID TS0505B and manufacturer name _TZ3210_x13bu7za.
Problem Description
When this light is added using the default ZigBee driver in Homey, the color temperature control works as expected, allowing the full range of color temperature adjustment from warm (yellow) to cool (blue) whites. However, when the light is added through the Lidl app, the color temperature range appears to be significantly restricted.
The light only changes to slightly warmer whites, but it doesn’t reach the warmer (yellowish) or cooler (bluish) extremes that the device is capable of. This limitation seems to stem from the color temperature range being incorrectly set in the driver.
Root Cause
It appears that the color temperature range is defined with a maximum value of 254 (stored in MAX_COLORTEMPERATURE), which doesn’t match the actual mireds range that the device supports. Most ZigBee lights, including this one, support a mireds range of 153 to 500, where:
- 153 mireds corresponds to a cool white (bluish),
- 500 mireds corresponds to a warm white (yellowish).
By using MAX_COLORTEMPERATURE = 254, the driver restricts the light to a limited range of mostly white tones.
Suggested Solution
To fix this issue, the driver should use the correct mireds range (153–500) instead of 0–254. Here’s a modified version of the lightTemperatureCapabilityDefinition to illustrate the necessary changes:
javascript
const MIN_COLORTEMPERATURE = 153;
const MAX_COLORTEMPERATURE = 500;
const lightTemperatureCapabilityDefinition = {
capabilityId: 'light_temperature',
cluster: CLUSTER.COLOR_CONTROL,
userOpts: {
set: 'moveToColorTemperature',
setParser(value, opts2 = {}) {
// Convert Homey’s 0-1 value to the mireds range (153-500)
const colorTemperature = MIN_COLORTEMPERATURE + ((MAX_COLORTEMPERATURE - MIN_COLORTEMPERATURE) * value);
return {
colorTemperature: Math.round(colorTemperature),
transitionTime: calculateColorControlTransitionTime(opts2)
};
},
get: 'colorTemperatureMireds',
getOpts: {
getOnStart: true,
getOnOnline: true
},
report: 'colorTemperatureMireds',
reportParser(value) {
// Convert mireds value back to Homey’s 0-1 range
return (value - MIN_COLORTEMPERATURE) / (MAX_COLORTEMPERATURE - MIN_COLORTEMPERATURE);
}
}
};
Why This Fix Is Important
Adjusting the color temperature range to the correct mireds values (153–500) will allow the light to fully utilize its capabilities, providing the entire spectrum from warm yellow to cool blue. Without this fix, the light is limited to a narrow white range, which doesn’t align with the actual capabilities of the RGB Ceiling Light.
Please let me know if I can help by submitting a pull request with these changes, or if there’s any further information you need to address this issue. Thank you!
Best regards,
Jiri