what I am trying to do is is automating my shutters depending on weather and light level.
What I also would like to do is to suspend the automation for 20 minutes, after the position of the shutter have been manually changed (manually here means either through home assistant or by using the physical switch next to th window).
For example: HASS closes the shutters to 80% due to the trigger light level. I open the shutters for some reason a bit later to 30%. Even if the trigger is true (light level above X for n minutes), the automation should wait for 20 minutes before executing again.
Is this possible? I don’t know even where to start with this.
Pretty easy, just have a condition in the automation to prevent it running if the last change in the shutters state was less than the desired value (in the above example, 20 mins).
Ah yes, but how would I do this if the end point was a light switch/dimmer instead of a cover? In this case, there would be State and Numeric State changes to monitor in the Condition (I think). Here is my current automation without the “pause condition I am trying to implement”:
Person walks into room → motion triggered → conditions met, action fires (lights on)
Person decides lights not at ideal brightness or would rather keep lights off → manually adjusts lights at physical switch
At this point, I would like the manual action to trigger a 1 hour pause on bullet point #1 trigger
This is important because I don’t want the automation to trigger after my motion sensor re-trigger time (30sec) expires and motion is again detected within that 1 hour timeframe.
Not sure it’s relevant to know, but I have a separate automation designed to turn off lights in this area when Lux > X.
So you would have to have another automation triggered by any change of the switch or dimmer (state triggers with null to: ) and have these conditions:
If it passes these conditions then you know it was a physical action on the switch/dimmer. You could then do something like start a timer in the actions of this automation.
Then (finally) add a condition in your motion automation that the timer must be idle.
As I said, you would have to jump through these hoops even if you had your requested automation pause, just to work out what caused the change to the light.
I think I got it working. I created a ‘timer.start’ Helper with a value of 1 hour and used that as my Action in the following new automation. My use case is that I do not want the motion automation to trigger for 1 hour if the physical light switch is adjusted in any way.