hi guys,
i was wondering if there was a way to use the “for” statement on the “from” state too.
In particular this is the automation i created
- action:
- alias: Notify to iPhone
data:
message: "arrived home"
service: notify.ios_iphone
alias: arrived at home
condition:
- after: '08:00:00'
before: '23:30:00'
condition: time
id: '1502891081254'
trigger:
- entity_id: device_tracker.iphone
from: not_home
platform: state
to: home
# this is optional and make such that condition is triggered only if home
# persist for more than 10 minutes
for:
hours: 0
minutes: 10
seconds: 0
so with this automation everything works as expected but in order to make it more robust i would like notification to be sent ONLY if “not_home” state persisted for more than 30mins for example.
Is there a way to do that?
thanks a lot to whom will help!