I have an outlet that powers inflatables outside from October through January. To prevent these from getting ripped out of the ground, I want the outlet to shut off any time my wind gust entity has a value over 15; but I would like the automation to run every time the sensor is updated. The intended design on this would be:
Wind speed entity is updated and if date is between 10/1 and 1/14
If wind speed is above 15, turn off outlet
else turn on outlet
This would allow them to be turned on when the wind drops off, but turn off when the wind begins to blow. I’m running HA on Docker and have tons of processor/memory overhead so run frequency isnt really a concern for me.
Thanks for the prompt reply but I’m not sure that I’m tracking what you’re saying with the reply and how to correlate that information into this. With my current config, even if I increased the upper limit to 15, it would turn off on trigger, but how can I handle turning things back on when the limit drops below that? The example the link provides for climate is quite nearly parallel to my use case, but I’m not quite understanding as to why the trigger is not firing when there is always a wind gust speed (see below)
Triggers are based on events. For a numeric state trigger the event is the value crossing the defined threshold in the defined direction. Just being in a state on one side of the threshold is not enough.
So, your original trigger creates a situation where the light will only ever be turned off by the automation when the wind gust sensor goes, instantaneously, from 0 to a number above 15.
There are a few ways to handle this. The better option for this situation is probably going to be using two numeric state triggers. I have included a duration for the “turn on” trigger to prevent the outlet bouncing on and off if the sensor value fluctuates, but if the sensor value doesn’t update often, that might be overkill.
Thanks so much for the detailed reply. I really appreciate it. Took a look at the sensor and it looks like it is updating every 10 minutes and never more often over the last week so knocked the 2 minutes off on my implementation, but that is a very valid consideration for the future. Happy new year to you kind soul!