AlexxIT / XiaomiGateway3

Home Assistant custom component for control Xiaomi Multimode Gateway (aka Gateway 3), Xiaomi Multimode Gateway 2, Aqara Hub E1 on default firmwares over LAN
https://github.com/AlexxIT/Blog
MIT License
2.38k stars 328 forks source link

How to support color lights #1396

Open ym66666 opened 3 days ago

ym66666 commented 3 days ago

How to support color lights? external converter No color mode

ym66666 commented 2 days ago

My lights support color adjustment image image image

ym66666 commented 2 days ago

2024-07-03 19:08:24.511 DEBUG (MainThread) [custom_components.xiaomi_gateway3.mqtt.192.168.31.89] {'topic': 'central/report', 'data': b'{"id":727277201,"_to":128,"type":16,"method":"properties_changed","params":[{"did":"1116431503","siid":2,"piid":4,"tid":158,"value":6205951}]}'} image I can't find the corresponding converter, so I can only use MathConv instead, but I can't choose the color. image

flyibeat commented 2 days ago

Maybe you can try: MathConv("color", "number", mi="2.p.4", min=1, max=16777215)

ym66666 commented 1 day ago

First of all, thanks bro. image I tried,but it's separate and I want it to be integrated into the light

flyibeat commented 1 day ago

First of all, thanks bro. image I tried,but it's separate and I want it to be integrated into the light

light.py Include elif conv.attr == ATTR_HS_COLOR: self.listen_attrs.add(conv.attr) modes.add(ColorMode.HS)

so,Try to change the name from color to hs_color

ym66666 commented 1 day ago

image image image The color palette appears, but has no effect and causes some abnormalities in turning on and off the lights

ym66666 commented 1 day ago

image

flyibeat commented 1 day ago

Homeassistant does not support the decimal color code, and the author needs to add the relevant conversion code.在 2024年7月6日,15:38,ym66666 @.***> 写道: image.png (view on web) image.png (view on web) image.png (view on web) The color palette appears, but has no effect and causes some abnormalities in turning on and off the lights

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

flyibeat commented 1 day ago

Homeassistant does not support the decimal color code, and the author needs to add the relevant conversion code.在 2024年7月6日,15:38,ym66666 @.***> 写道: image.png (view on web) image.png (view on web) image.png (view on web) The color palette appears, but has no effect and causes some abnormalities in turning on and off the lights

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>