Automation for home zone

would be awesome if there was a easy way to specify zones as conditions in the automations builder. like i have zones setup for home obviously and for mine and my wife’s work. im trying to execute commands when no ones home but if im at work it doesn’t know the difference and treat as if im home essentially.

Integration builder?

If you mean the automation editor, does it not support the zone condition?

sorry not sure why i put integration but yes its automation.
yes under condition you can put like not home as a condition for a device entity but if that device is at listed in another zone thats not away such as “work” it treats it the same as if it was “home”.

Put the name of the zone in the condition state, e.g. “zone.work”.

so ill post the entire script here and you can see the trigger has that ability but the condition doesnt.
so the condition is_not_home but if im at work it sees that as home basically.
so if one the deivces is at work and one of the devices leaves the home it should in theory trigger the command because both devices are not home but it doesnt. if i delte those work zones it works fine.

alias: Blink Away
  description: ''
  trigger:
  - platform: device
    device_id: 5c4c7b35fa2b6cd723c359200d10f620
    domain: device_tracker
    entity_id: device_tracker.christopher
    type: leaves
    zone: zone.home
  - platform: device
    device_id: 7e1cf234b25f1baa0b21bec6aadca41e
    domain: device_tracker
    entity_id: device_tracker.kelli
    type: leaves
    zone: zone.home
  condition:
  - condition: and
    conditions:
    - condition: device
      device_id: 5c4c7b35fa2b6cd723c359200d10f620
      domain: device_tracker
      entity_id: device_tracker.christopher
      type: is_not_home
  - condition: and
    conditions:
    - condition: device
      device_id: 7e1cf234b25f1baa0b21bec6aadca41e
      domain: device_tracker
      entity_id: device_tracker.kelli
      type: is_not_home
  action:
  - service: alarm_control_panel.alarm_arm_away
    data: {}
    target:
      entity_id: alarm_control_panel.blink_house

You are using device conditions. Use zone conditions instead. Then you can define the zone you want.

i looked at the zone conditions but dont really think they help??

condition: and
conditions:
  - condition: zone
    entity_id: device_tracker.christopher
    zone: zone.home

This is the only option you get besides changing the entity to another phone.

This condition will only pass when you are in your work zone, rather than just away from home:

condition:
  - condition: zone
    entity_id: device_tracker.christopher
    zone: zone.work

i think i have an idea on how i could make it work but would be a lot of customizing conditions to meet every zone

Ok, maybe I misunderstand you. Could you explain this again:

Do you just want to know when you are away from home?

I don’t know how to do this, and I wish I did. But I think what would be perfect, would be to call a script that evaluates every device you decide on, whether or not they are ALL NOT zone.home. Can a script be called from automation and pass back a Boolean value? I use zones to close my garage wen I get 125 feet from home if the time is past 04:00:00 and before 19:00:00. I actually have found that device.tracker is flaky and not consistent.

  - alias: leaving home so close the garage door if its open
    trigger:
      platform: zone
      entity_id: device_tracker.bryaniphonese
      zone: zone.125fthome
      # Event is either enter or leave
      event: leave # or "leave"
    condition:
      - condition: state
        entity_id: binary_sensor.my_garage_door
        state: 'on' # off means closed and on means open so only open if it is closed
      - condition: time
        after: '04:00:00'
        before: '19:00:00'
    action:
      - service: notify.mobile_app_bryaniphonese
        data:
          title: "Closing the garage door"
          message: "Closing garage door, Bryan is 125ft from home!"
      - service: switch.turn_on
        entity_id: switch.my_garage
      - delay: 500 ms
      - service: switch.turn_off
        entity_id: switch.my_garage

basically i need my cameras to turn on when no ones home.
if im at work in my “work” zone and my wife leaves home it wont turn on the cameras
if my wife is in her “work” zone and i leave it wont turn on either.

After some research it seems as if any zone is treated as a home zone. hopefully that makes more sense.

The simplest way to do this is to put both trackers in a group ( let’s call it ‘everyone’) and use:

condition:
  condition: state
  entity_id: group.everyone
  state: not_home

i mean that seems simple enough if it actually works. i just wonder though if devices are in a different zone if itll see it as “home”.
Ill have to mess with it and see i suppose

well i changed it up. i suppose well test it tomorrow and see if it works.

alias: Blink Away
description: ''
trigger:
  - platform: device
    device_id: 5c4c7b35fa2b6cd723c359200d10f620
    domain: device_tracker
    entity_id: device_tracker.christopher
    type: leaves
    zone: zone.home
  - platform: device
    device_id: 7e1cf234b25f1baa0b21bec6aadca41e
    domain: device_tracker
    entity_id: device_tracker.kelli
    type: leaves
    zone: zone.home
condition:
  - condition: and
    conditions:
      - condition: state
        entity_id: group.awesome_people
        state: not_home
action:
  - service: alarm_control_panel.alarm_arm_away
    data: {}
    target:
      entity_id: alarm_control_panel.blink_house
mode: single