After installing home assistant app on an iPhone, I want to create an automation based on the state of this entity ‘device_tracker.iphone’. I see when looking at the entity value it shows ‘Away’ when the phone is not in use.
However when trying to set up an automation rule for when the iPhone is “away” using ‘and if’ the state equals attribute value of ‘Away’, it only shows GPS values for that entity type.
How can I use an automation rule with a condition that’s based on this entity status of "Away’?
Yes, same for me on my Android and iPhone devices. But how do I use either of those values as automation conditions?
When I’m in automation condition fields, I don’t see how you set it to ‘away’ or ‘home’
description: "If kitchen lights come on when I'm not home, sound the alarm"
mode: single
triggers:
- trigger: state
entity_id:
- light.kitchen_counter_lights
to: "on"
conditions:
- condition: state
entity_id: device_tracker.nokia_g21
state: not_home
actions:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.kitchen_siren_switch
Thank you for helping me. So I’m a little confused, does this entity correlate to my zones and if so, how does it determine the ‘away’ value versus other establishes zone values?
If I’m off on this, essentially I want to have an automation that triggers when this particular entity equals the value ‘away’