Hello,
i want to use “time controlled presets” to change the brightness. Just the brightness. I did a test and unfortunately the light gets also switched on.
Is there a setting i did not found or how can i accomplish this?
I would guess it’s just not updating the gui slider when pressing the main Off button.
“on”:false would keep it off and when you turn it on with the main button it would be set to whatever brightness your preset had called prior.
{“on”:false,“bri”:20,“transition”:10000}
I am guessing there is no way to adjust the brightness w/out changing the state. I think this would need to be addressed in the coding and not in the json api box.
@Jinx is correct.
Any “bri” > 0 will turn WLED on. And “bri” == 0 will turn it off.
UI (and WLED internally) knows previous brightness so the slider does not change.
If you want to keep WLED off and change the internal brightness you will need to add "on":false to your API
I see. Thank you both for the informations.
Adding "on":false is not what i want, because this would turn the light off if it is on in this moment.
My goal is to do time dependent brightness. So this is not possible with Wled without a more or less sophisticated management by an external system (e.g. Home Assistant).
Is there any chance that the on state and global brightness get decoupled in the api? Or is there a technical reason for the tight coupling?
Then use brightness >0. With gamma of 2.8 (WLED default) this will render LEDs black.
No, brightness is not “coupled” with on state. It is the on state internally.
UI (and API) provide “on” property so you do not need to take care of the brightness saving in external system.
Changing this would require too many changes so it will most likely not happen.
Still, you have a workaround by manipulating segment opacity.
I am guessing that @Hans wants the lights to when turned On or are On to be on at a certain brightness during certain times of day. No matter if they are currently On or Off, that when they get turned on or are already On, at a given time frame they maintain a set brightness level.
Least I think that is their idea. For that they would need to check If they were On or not when setting On state. (I don’t think the api box supports that)
I’ve got a similar issue but with what you’re saying why does {“on”:false,“bri”:130} switch off the lights - surely the entries get enumerated in order so the “on”:false sets brightness to 0 but then the “bri”:130 would set the brightness to 130 hence switching the lights on?
Not trying to be argumentative, just trying to understand how to resolve my own issue - what would be good is a way to get the current “on” state and be able to use that, something like:
{“on”:{current on state},“bri”:130}
That’s what I want - if the lights are on they stay on with new brightness but if they are off they remain off but the brightness is set for when they are next turned on.