WLED automation causing flashes

I have installed two WS2812B light strips under my bed both controlled by separate Athom WLED controllers. I have used motion sensors to detect when someone is out of bed at night and turn on a preset that gives gentle floor level lighting. Both WLED controllers have the preset configured identically and I am using the select.select_option > select.wled_preset service in the automation. The problem is that when either of the strips are turned on by the automation there is a very intense bright white flash for a fraction of a second before the preset light configuration takes effect. If I turn on the strips from the HA device/entity directly this doesn’t happen.

The fact that it is affecting both strips in the same way makes me think that the problem lies within either the WLED software or the HA integration but I would appreciate any help or ideas that anyone can give.

Thanks

Post your automation.

The automation is in Node Red as follows:

[{"id":"2915729bc4228121","type":"api-call-service","z":"bf99592ad8ae8c4d","name":"turn off bedleds","server":"3d53c477.b8ddbc","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":["e1a258db4ee870da986c3552e76ce044","0c26757869a54fa45d982761181c313c"],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":770,"y":2415,"wires":[[]]},{"id":"b3ecd4135cfc72c3","type":"switch","z":"bf99592ad8ae8c4d","name":"on/off","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":275,"y":2355,"wires":[["8e577ce7b40a527f","8f9a1a53fc640169"],["8f9a1a53fc640169"]]},{"id":"8e577ce7b40a527f","type":"rbe","z":"bf99592ad8ae8c4d","name":"value changed?","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"topic","x":440,"y":2355,"wires":[["238b5614123c445c"]]},{"id":"238b5614123c445c","type":"switch","z":"bf99592ad8ae8c4d","name":"on/off","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":605,"y":2355,"wires":[["eb567ce67cafc1d0"],["2915729bc4228121"]]},{"id":"8f9a1a53fc640169","type":"trigger","z":"bf99592ad8ae8c4d","name":"1m no motion","op1":"","op2":"","op1type":"nul","op2type":"pay","duration":"1","extend":false,"overrideDelay":false,"units":"min","reset":"on","bytopic":"all","topic":"topic","outputs":1,"x":445,"y":2415,"wires":[["8e577ce7b40a527f"]]},{"id":"e350c105484b3ea1","type":"trigger-state","z":"bf99592ad8ae8c4d","name":"bedside motion","server":"3d53c477.b8ddbc","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"binary_sensor.bedside_motion","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"targetType":"entity_id","targetValue":"input_boolean.night_time","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"on"}],"inputs":0,"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","enableInput":false,"x":110,"y":2355,"wires":[["b3ecd4135cfc72c3"],[]]},{"id":"eb567ce67cafc1d0","type":"api-call-service","z":"bf99592ad8ae8c4d","name":"bedled night preset","server":"3d53c477.b8ddbc","version":5,"debugenabled":false,"domain":"select","service":"select_option","areaId":[],"deviceId":[],"entityId":["select.bedled1_preset","select.bedled2_preset"],"data":"{\"option\":\"Night\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":780,"y":2355,"wires":[[]]},{"id":"3d53c477.b8ddbc","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","statusSeparator":"","enableGlobalContextStore":false}]

What happens when the WLED light is off in HA and you call (from HA, not node-red) the select.select_option service in the developer tools → services tab?

That’s a good suggestion, thanks. I am not able to try that out until later today but I will do it and then report back.

Same bug here with playlists. I start a playlist when the sensor is triggered and one when no more movement is detected. The effect (preset) is the WLED sweep with tb:0. One playlist starts with this preset and ends after 4 seconds on a solid preset.

If there is no more movement, the second playlist is selected. This also has a sweep with tb:0 but as a reverse and a solid with black color also 4 seconds.

This means I have a running light that keeps the light on after all 300 LEDs light up. And if there is no movement, the running light is deactivated in the opposite direction.

In both cases, before the effect is carried out, the LED strip lights up in HA for approx. 1 second at 50% in the selected effect color.

The error is both in automations and when calling a playlist directly.

Can someone please check this?

@petro Do you have any idea?

Thank you ! :slight_smile:

Confirming the same issue. Almost identical setup to @dkx - I have a motion automation that triggers a wled playlist. In my automation i turn the entity on then call the select service to enable the playlist. The flash occurs (less than a second), a wipe animation ending with tb:0 runs, and then the solid preset holds until the timer runs out and the light is turned off.

Interestingly the flash does NOT occur when calling the playlist through the device UI in HA. Looking at the logs I don’t really see a difference in events on the device level.

The both of you are calling a turn on service and a playlist. Don’t call the turn on service, the playlist selection should turn it on if you store the on/off value with your playlist.

All lights behave this way, when you call a turn on service the hardware itself will resume whatever the last state was before it turned off. So the flashing you’re seeing is the resuming state, followed by your playlist. Just call the playlist.