I would like to use a Shelly dimmer (integrated into HomeAssistant via esphome) to dim the lights above the entrance door. The complication is that those lights are connected to a stairway lighting timer that makes them blink several times before switching off all lights.
I’d like to configure the esphome firmware for the Shelly dimmer in such a way that it does turn the entrance lights on once a switch is pressed in the stairway. But then ignores the additional “off” state changes generated by the stairway lighting timer so that the entrance lights don’t blink (and only those in the stairway do).
Is there a way to make esphome trigger once e.g. via “on_state” and then to ignore any further state changes, within a certain time window thereafter?
I not sure if you converted the shelly to esphome or if your using the shelly as normal. What I would do is use the shelly as normal and use HA as the timer and include conditions in your automation to do what ever you like…
if you are using esphome then yes you can do it under conditions… if you need help in your code we will have to see your code to help further…but…where is your timer is it sand alone or is it in HA or ESPHome. Looks like it is stand alone timer and when it turns off AH and or ESPHome see the state change and then turns it back on causing the “blink”. I would recommend using HA to control everything. Below is examples of conditioning in ESPHome.
You might pretend it’s a ‘debounce’ problem, for which ESPHome already has parameters for binary sensors (to deal with physical switch bouncing).
Normally, debounce timeouts are in the range of a few miliseconds, but in your case they might also be helpful with longer timings, in the range of several seconds.
Thanks for your reply. Yes, I flashed esphome on the Shelly and, ideally, the described behaviour would work without HA (I like to have as much functionality implemented standalone in esphome, e.g. in case the HA machine is down or so).
Thanks also to you for your reply. I actually saw the delayed_{on,off,on_off} options in the documentation and felt this could be a potential solution. But I couldn’t figure out how exactly this could be done.
As I wrote - the very first (on) signal I want the shelly to react to (switch the light on) and the following (off) signals I want to ignore.
… Thinking about this more now - I essentially need to “filter out” the off events, i.e. if I set a delayed_off time that is larger than the off signal generated by the stairway lighting timer then it should work, right?!
If this is all controlled in Home Assistant, then it’s easy to do.
You just write an automation that’s triggered by the Shelly’s transition to ‘on’, and don’t write one that’s triggered by its transition to ‘off’.
which “both devices” do you mean? the Shelly and the time? The problem is that the LED spots that we have are way to bright so I want to dim them → By means of a Shelly between the timer and the spots. Permanent power source for the Shelly is not a problem but that the “input” coming from the timer (as is common for these) has these “blinks” where the power is briefly interrupted to indicate that the lights will turn off completely soon. Those I don’t want the Shelly to react to
power -> the blink thingy -> Shelly -> light (the non flashing)
-> the flashing light
Can’t you seperate these things, like so?
power -> Shelly -> light
-> the blink thingy -> flashing light
I’m asking, because I don’t see the need to run both things together, if not something else is hindering you to seperate these. It would also have the advantage, that you can control both things without the other interfering. Or am I missing something here?
Your description of the ‘blinks’ makes me wonder if they might not be shelly-caused at all.
For example, I have LED lamps that, if connected to a shelly dimmer will blink (rapidly) unless I run the Shelly app’s ‘calibrate’ function, which programs the dimmer not to fall below a certain level.
You are right - I could, of course, but then I’d have to run new wires all the way through the house from the distribution box to the lights in my particular case. Possible but I first wanted to see whether I can do this in software
If it turns out to be impossible there is no other way than what you described.
I know what you mean. No, it’s not that. It’s really the stairway lighting timer that causes these blinks. They are mandatory in houses with tenants so that somebody walking the stairs knows that the light will go off soon and won’t suddenly stand in the dark.
Thanks for the feedback. I’m sure, this is just me, but can’t you split the power at that point, where you are doing the junction right now? You should already have everything you need (in my imagination), but just need to switch some cables.
I’m not sure, that I can describe properly what I’m trying to say. If you are interested I could draw a pic…
If your automation is in Home Assistant, perhaps all you need is to use the “…off, for N seconds” variant of the trigger clause.
So when the stairway lights blink, they won’t be “off for at least N seconds” and your automation will ignore the blinking.
And once they go off, and stay off, your automation will trigger and do what you want, such as turn off the entry light.
I currently don’t have a junction I have one cable (live, neutral, ground) going from the timer all the way to the entrance. The timer briefly switches the power off during the mentioned blinks on this one cable.
And from that cable you’re powering the Shelly? That would mean, it has no power during the off-states of the timer?
I still don’t get how you wired that all up. If you have the Shelly powered via a different cable, you should be able to work totally seperated from the timer. If not, the Shelly would be powerless for some (milli)seconds, so that won’t work either.