I am working on an Access Control Unit, with a RFID sensor, RGB status led and Buzzer.
I have several states of the led and buzzer, depending on some trigger inputs like a RFID tag and a door sensor.
To control the different states of the led and buzzer I created several Scenes in HA that set the led color and pulse effect, and the buzzer beeps.
This is all working pretty nice up to now, but I now want to add an asymmetric led pulse effect like this:
So the led should be on for a long time, and off for a short time.
As I understand it, this is not possible with the default Pulse effect: the āupdate_interval ā and ātransition_lengthā will always give a symmetric effect (the on duration is identical to the off duration).
I tried to do this with a lambda, but am unsuccessful up to now.
My last trial was this:
But the C++ āsleep_forā (and also āsleepā for that matter) are not accepted by ESPHome (āsleep_forā was not declared in this scope), and I now understand that it is not sound anyhow to use any kind of Delay in lambdas.
Does anybody have a suggestion how to implement this?
The only slight disadvantage here is that it seems that a ātransition_lengthā is not possible with the Strobe effect, so the on/off transition is now very abrupt.
But I can live with that.
And another issue is that the color of the RGB led does have to be defined in the Strobe effect itself.
For the Pulse effects that is done in the HA Scene setup.
But again, I can live with that.
The led indeed is working as intended now, so since there were no comments or suggestions for other solutions, I have marked my second post as solution for the issue.
Hello, i am searching for a similar solution but i need to change to color āon the flyā and this strobe effect always lights in white color if i donāt set the RGB values inside.
Pulse effects work with the selected colors on the home-assistant GUIā¦
any suggestions?
i agree, I had a similar case - and the first thought was, to use the āpulseā effect.
Strobe seems a bit off, because you need to set colors etc.
I would really appreciate, when both effects could be combined / inherited - so that you can either configure colors within the pulse, or configure the pulse with different on / off settings - or that you can ignore color settings on strobe / set transition lengths in the strobe effect.
Hey, I found a potential solution for blinking the RGB LED via another switch template. It is not yet ready but it works if I set the RGB color in the main RGB LED button and switch on the template switchā¦