Hi, my zone automation doesn’t work because all zone in HA are as at_home. I had to delete all zone , but not Home, to fix this. How I can add Custom Zone, for example Work’s Zone, to insert it in a Automation without HA interpreting it as “at_home”? So some not_home zone. Thank you
The state of a zone is the number of people in it (ref). The state of a person is the name of the zone they’re in (ref); same for device trackers (ref).
What are you trying to do with your automation?
It is hard to tell what went wrong if you do not show us what you did. It is also not clear what you mean with zones being at_home, because even vor the home zone or device trachers, this is not a state they can be in.
Check developer tools to see the actual state of an entity, and show us your automation.
I’ll try to explain it to you again: I had made an automation that when there is no one at home (not_home) or the first person to arrive home (at_home), for example, the alarm is activated or deactivated. Everything works if there is only one Home zone in my Zones. For example, if I enter Work, Home Assistan considers any Zone at_home. This is the problem. is it more clear now?
No. Read my post again, slowly; and share the YAML code for your automation, correctly formatted.
at_home
is not a state that HA uses. Are you sure you’re using Home Assistant?
You’re probably going to have to show us your automation to get the appropriate help.
It might be as simple as that you are tracking the wrong type of entity in your automation, or that you’re triggering on that entity changing to a state to which it will never change…
So this is the automation:
"alias: Home_in_off_device
triggers:
- entity_id:
- person.yyyyy
- person.xxxxx
zone: zone.home
event: enter
trigger: zone
conditions:
- condition: state
entity_id: input_boolean.in_casa
state: “off”
actions: - target:
entity_id:
- switch.smart_switch_xxxxxxxxx
- switch.smart_switch_xxxxxxxxx
- switch.smart_switch_xxxxxxxxx
- switch.presa_cucina_outlet
- switch.presa_corridoio_outlet
action: switch.turn_off
data: {} - action: script.ring_disabled_mode
data: {} - data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
device: Tiger
command: disallarma
target:
entity_id: remote.salonepro
action: remote.send_command - target:
entity_id: input_boolean.in_casa
action: input_boolean.turn_on
data: {}
"
If I add other zone, the other zone are interpreteted as at_home , so the automation doesn’t work.
Because all Zone are as “at_home”. After deletention of all zone, the automation are fixed
Now format the code correctly — see the link in my last post.
I still don’t know what you mean by this. Show a screenshot.
You could try using a state trigger on the person entities rather than a zone trigger:
triggers:
- trigger: state
entity_id:
- person.yyyyy
- person.xxxxx
to: 'home'
That works because the state of a person (that has a GPS tracker device associated with them) is the name of the zone they’re in.
Ok I’ll try. I’ll update you when it will be done.Thanks.
Nothing, doesn’t work. If I add some zone with Home, the automation doesn’t works. My zone are recognized as “home zone”. For example in attach, “Policlinico …” is a my custom zone ad this is a result…“not_home” is false… HELP! I changed the automation as state’s trigger, but nothing…
Screenshots
not_home
does not mean anywhere but home, it means not in any defined zones.
If you want not in any defined zone and not home then you can trigger on:
trigger: state
entity_id:
- person.suatta
not_to: home
This should trigger every time your person entity change state to something that is not home
The solution is overwrite the home default Zone.Thanks anyway