dave-code-ruiz / elkbledom

Home Assistant custom component for LED STRIP NAME ELK BLEDOM
MIT License
77 stars 16 forks source link

Color temperature widget has too high values #31

Closed Double-A-92 closed 1 year ago

Double-A-92 commented 1 year ago

In this view to set the color temperature the values range from 10000K to 999999K, which is too much.

A reasonable range would maybe be 1000K to 9999K. I assume there is maybe some wrong decimal offset..?

image

Also the color for me does not work properly. It's either green-ish at around 10000K, and everywhere else it's a white-blue. I don't know if it's just my LED strip not supporting it, or if it's because of the high values,

Jammarman commented 1 year ago

I am also experiencing this

GormYa commented 1 year ago

I think we should make this range manageable from the settings page. As a result, each user may define their own range that is supported by their LED strip.

Double-A-92 commented 1 year ago

I think the problem is caused by following lines in light.py

@property
    def max_mireds(self):
        return 100

@property
    def min_mireds(self):
        return 1

They overwrite the good defaults (2000 - 6500K) with very high values for some reason.

dave-code-ruiz commented 1 year ago

Thanks, you may be right I review it soon

Double-A-92 commented 1 year ago

Btw I just saw that the function async def set_color_temp(self, value: int): in elkbledom.py also depends on those values (1 - 100). If you change the values, don't forget it :)