Plan: When I get home and connect to the wifi it turns on a light.
Problem: Wifi drop outs it retriggers the event.
Solution: Set a condition that the state not_home needs to be greater than 10mins to trigger event
Problem: I can’t find a way to set “greater than” only at a set time.
Is there a way to set a time or state to greater than?
alias: Get home turn on light
trigger:
platform: state
entity_id: device_tracker.1921681103tpgicomau
state: home
condition:
platform: state
entity_id: device_tracker.1921681103tpgicomau
state: not_home above or greater than, etc:
hours: 0
minutes: 15
seconds: 0
action:
service: switch.turn_on
entity_id: switch.lamp01
condition: state
entity_id: device_tracker.paulus
state: not_home
# optional: trigger only if state was this for last X time.
for:
hours: 1
minutes: 10
seconds: 5
Thanks for the reply. I have tried for but it doesn’t trigger. I’m assuming it’s because it’s for a set amount of time. So as soon as it’s a higher value than what I have set e.g. 5mins it won’t trigger. That’s why I was wondering if there was a 5mins or greater options that might work.
Or is that example meant to include X time or greater?
Going to try this as a work around. added consider_home: 1800
So it will take 30mins to make me as not_home. This should be more than enough to take into account dropouts.
Ouch, reading again I think I missunderstud your question initially.
Yes, you should increase your consider_home time, or maybe consider combine nmap with another device_tracker method, to increase fiability.
I am using bluetooth detection right now because iPhone drops wifi when sleeping for a time.