Skip to content
This repository has been archived by the owner on Nov 4, 2023. It is now read-only.

Control RGBW led strips #792

Open
christophebaraer opened this issue Nov 15, 2021 · 1 comment
Open

Control RGBW led strips #792

christophebaraer opened this issue Nov 15, 2021 · 1 comment

Comments

@christophebaraer
Copy link
Contributor

Recently wired a RGBW LED strip to a Shelly RGBW controller and added the entity to a LIGHT tile. The config I have is the following :

{
                position: [0, 1],
                title: 'Led strip',
                id: 'light.ledstrip_gameden',
                type: TYPES.LIGHT,
                state: switchPercents('brightness', 255, true),
                states: {
                    on: "On",
                    off: "Off"
                },
                icons: {
                    on: "mdi-lightbulb-on",
                    off: "mdi-lightbulb",
                },
                sliders: [{
                        title: 'Brightness',
                        field: 'brightness',
                        max: 100,
                        min: 0,
                        step: 10,
                        request: {
                            type: "call_service",
                            domain: "light",
                            service: "turn_on",
                            field: "brightness_pct"
                        }
                    },
                    {
                        title: 'Color temp',
                        field: 'color_temp',
                        max: 588,
                        min: 153,
                        step: 15,
                        request: {
                            type: "call_service",
                            domain: "light",
                            service: "turn_on",
                            field: "color_temp"
                        }
                    }
                ],
                colorpicker: true
            }

Using the + / - to increase or decrease the brightness only works when either the RGB channels are on but doesn't when the White channel is used.

I was wondering about the required changes in my configuration to support increasing / decreasing the brightness of the White channel ?

@alphasixtyfive
Copy link
Contributor

It might be to do something with how brightness is calculated:

(brightness / 255 * 100 / 10) * 10

https://github.com/resoai/TileBoard/blob/master/scripts/controllers/main.js#L1247

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants