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

hotfix(Sengled): return RGB colors to bulbs and convert to modern extend #7317

Merged
merged 10 commits into from
Apr 3, 2024

Conversation

mrskycriper
Copy link
Contributor

@mrskycriper mrskycriper commented Apr 2, 2024

This bug was introduced in #7168

Also converted all Sengled devices to modern extend along the way :)

PS

I'm not sure about color: true since previous legacy extend technically only exposed XY color by default.

@mrskycriper
Copy link
Contributor Author

Marking as draft before testing confirmation

Can somebody please test any affected Sengled bulb with this temporary external converter? I need to now if they support hs, xy or both color modes. Replace zigbeeModel for your bulb if necessary.

const {light} = require('zigbee-herdsman-converters/lib/modernExtend');

const definition = {
    zigbeeModel: ['E21-N1EA'],
    model: 'E21-N1EA',
    description: 'Smart LED multicolor A19 bulb',
    vendor: 'Sengled',
    extend: [light({effect: false, powerOnBehavior: false, colorTemp: {range: [154, 500]}, color: {modes: ['xy', 'hs']}})],
}

module.exports = definition;

@mrskycriper mrskycriper marked this pull request as draft April 3, 2024 09:22
@mrskycriper
Copy link
Contributor Author

UPD

HS color mode is confirmed to be supported. Re-opeing PR as ready for merge.

@mrskycriper mrskycriper changed the title fix(Sengled): return RGB colors to bulbs and convert to modern extend hotfix(Sengled): return RGB colors to bulbs and convert to modern extend Apr 3, 2024
@mrskycriper mrskycriper marked this pull request as ready for review April 3, 2024 11:50
@BronsonZ
Copy link

BronsonZ commented Apr 3, 2024

I tested my Sengled E12-N1E BR30 bulbs with the following external converter:

const {light, electricityMeter, forcePowerSource} = require('zigbee-herdsman-converters/lib/modernExtend');

const definition = {
    zigbeeModel: ['E12-N1E'],
    model: 'E12-N1E',
    vendor: 'Sengled',
    description: 'Smart LED multicolor (BR30)',
    extend: [
        light({effect: false, powerOnBehavior: false, colorTemp: {range: [154, 500]}, color: {modes: ['hs']}}),
        electricityMeter({cluster: 'metering'}),
        forcePowerSource({powerSource: 'Mains (single phase)'})
    ]
};

module.exports = definition;

Using only color: {modes: ['hs']} I was not able to change the color of the bulbs, only the color temperature

When I set color: {modes: ['xy']} I was able to change the color again

At least for my bulbs, it doesn't look like they respond to "color_mode": "hs"

Setting color: true and color: {modes: ['xy', 'hs']} also works, all of the MQTT messages use "color_mode": "xy"

@mrskycriper mrskycriper marked this pull request as draft April 3, 2024 15:58
@mrskycriper
Copy link
Contributor Author

Reverted to XY color mode for all lights. As was done before the bug.

@mrskycriper mrskycriper marked this pull request as ready for review April 3, 2024 17:10
@Koenkk Koenkk merged commit 6500935 into Koenkk:master Apr 3, 2024
2 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Apr 3, 2024

Many thanks! Seems I was sleeping during #7168 😴

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