I am looking for some ideas / input from you clever people, basically I have a working automation that notifies me of my wife’s location changes that currently has a condition that I am at home (as otherwise we are typically together) however I have a mild annoyance in that commonly when we either leave together or arrive home together I get the notification due to the iphones being logged as home at different times.
What’s the best or easiest way to clear this up, I wondered if I could make a binary sensor to state if we are close to each other and use that as a condition - thinking about it, it would be nice to have the notifications regardless of if I am home or not but just based on us not being together.
Yes of course, we use HA to track the whole family, my wife is a particularly nervous driver for example and likes the security of me knowing she has safely arrived at destination. In fact it was almost a demand from her in order to get her back driving again on her own after several years of her not driving.
You could use the wait for trigger in the automation.
So trigger when she arrives home, wait for trigger that is that you arrive home and have nothing happen if you also arrive home.
But the default action is to notify you after a few seconds (or perhaps minutes).
Yeah I thought about a time delay or wait but cant wrap my head round it, as at present the trigger is based on zone changes like this:
trigger:
- platform: state
entity_id: device_tracker.ej_iphone_app
condition:
- condition: template
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}'
- condition: state
state: home
entity_id: person.ross
I guess I want to remove the condition of me being at home and have a condition of us not being in close proximity to each other as if I was at work for example I currently dont get the notifications she has arrived at zone as I am not at home.
Was thinking along the lines of a template sensor or boolean that represents if we are over a set distance from each other - currently use icloud3 and wondered if there was a way of harnessing the travel times or distances but at present these just appear to show distance to home - maybe template to difference the two distances but thats not the best as we could both be 10 miles away but in opposite directions.
Filter round(precision, method, default) will convert the input to a number and round it to precision decimals. Round has four modes and the default mode (with no mode specified) will round-to-even. If the input value can’t be converted to a float, returns the default value, or if omitted the input value.
round(precision, "floor", default) will always round down to precision decimals
round(precision, "ceil", default) will always round up to precision decimals
round(1, "half", default) will always round to the nearest .5 value. precision should be 1 for this mode
Of course, what an idiot. I have lost count of the amount of times this has happened to me, as doing things in UI, Dev tools and yaml etc, they seem to have slightly different requirements.
Thank you so much for your help, greatly appreciated.