So I have an LD2410 mmWave sensor. One of the “entities” is a distance number. My current configuration works most of the time set to “when entity state changes to 225”. That said it seems I could get the automation to work pretty much all the time if I could trigger it when the value is between 220 and 230.
From what I know, I could stack 11 “or’s” as the trigger, like if entity x is 220, or if entity x is 221 or if entity x is 223, etc. However I would like to think there is a better solution.
Any ideas?
You can trigger on a numeric state between two values. Note that this will trigger only when the value previously was out of this range.
Or you could trigger on a state change (instead of numeric state).
And then add a numeric state condition between two values.
Thank you @verjager I figured it out thanks to your help. Yes I understand it will only trigger if distance number is out of the range first. The sensor is by my front door, so when someone walks up to the door they end up being 220 to 230cm from the sensor.
When someone triggers the automation by walking to my front door, it lets the person know we will be opening the door shortly. It then sends notifications via Alexa that someone is at the door, then it sends whatsapp messages with a snapshot.
To prevent automation from running again if person is moving around, getting in and out of the 220 to 230cm range I set up a binary sensor. Once automation is triggered it checks to make sure binary sensor is “on”. If it is “on”, the automation actions start. First action is to turn the binary sensor off. I then call the rest of the actions, the at the end I am adding a 90 second delay and then turn the binary sensor back on.
The binary sensor also works for when I open the front door. It turns the binary sensor “off” for 2 minutes, so we can walk out of the house without announcing someone is at the door.