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

Add rgb_color converter #1396

Closed
ym66666 opened this issue Jul 4, 2024 · 10 comments
Closed

Add rgb_color converter #1396

ym66666 opened this issue Jul 4, 2024 · 10 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@ym66666
Copy link

ym66666 commented Jul 4, 2024

How to support color lights? external converter No color mode

@ym66666
Copy link
Author

ym66666 commented Jul 4, 2024

My lights support color adjustment
image
image
image

@ym66666 ym66666 changed the title How to support RGB lights How to support color lights Jul 4, 2024
@ym66666
Copy link
Author

ym66666 commented Jul 4, 2024

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
Copy link
Contributor

flyibeat commented Jul 5, 2024

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

@ym66666
Copy link
Author

ym66666 commented Jul 6, 2024

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

@flyibeat
Copy link
Contributor

flyibeat commented Jul 6, 2024

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
Copy link
Author

ym66666 commented Jul 6, 2024

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

@ym66666
Copy link
Author

ym66666 commented Jul 6, 2024

image

@flyibeat
Copy link
Contributor

flyibeat commented Jul 6, 2024 via email

@AlexxIT AlexxIT added the enhancement New feature or request label Jul 13, 2024
@AlexxIT AlexxIT self-assigned this Jul 13, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Jul 13, 2024

Unfortunately I don't have such lamps for the test. I'll try to do something about it.

@AlexxIT AlexxIT changed the title How to support color lights Add rgb_color converter Nov 23, 2024
@AlexxIT AlexxIT added this to the v4.0.7 milestone Nov 23, 2024
AlexxIT added a commit that referenced this issue Nov 24, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Nov 26, 2024

https://github.com/AlexxIT/XiaomiGateway3/releases/tag/v4.0.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants