Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 101976

Working with zones, away and not_home - I simply don´t get it

$
0
0

@AdmiralRaccoon wrote:

Hi there, I have created the below automations, which are supposed to turn off the lights when either my wife or me is leaving the house and nobody is home.

Sometimes it´s working, sometimes not. I believe it´s because I don´t understand whats the difference between a zone, away and not_home.

An example when it´s working:
We´re leaving both almost at the same time

An example when it´s NOT working:
I´m leaving earlier, and as I only need 5 minutes with my bike to get to work, I´m entering the zone “work” before my wife is leaving the home zone. When she´s leaving, none of the 2 automation will be triggered.

Now, my understanding was when I´m in another zone, which is not the home zone, I´m “not_home”, and if I´m in none oi my defined zones, I am “away”.
But obviously not, can someone fix my wrong thinking?

Thanks for any help…

Here is the code:

- id: '42'
  alias: Leaving-home-weekday-01
  trigger:
  - entity_id: person.rebecca
    event: leave
    platform: zone
    zone: zone.home
  condition:
    condition: and
    conditions:
    - condition: state
      state: not_home
      entity_id: person.philipp
    - condition: time
      after: 06:00:00
      before: 08:00:00
    - condition: time
      weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
  action:
  - service: light.turn_off
    entity_id: group.all_lights
  - service: switch.turn_on
    entity_id: switch.foscam_wohnen
##################################################################################################################################
- id: '43'
  alias: Leaving-home-weekday-02
  trigger:
  - entity_id: person.philipp
    event: leave
    platform: zone
    zone: zone.home
  condition:
    condition: and
    conditions:
    - condition: state
      state: not_home
      entity_id: person.rebecca
    - condition: time
      after: 06:00:00
      before: 08:00:00
    - condition: time
      weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
  action:
  - service: light.turn_off
    entity_id: group.all_lights
  - service: switch.turn_on
    entity_id: switch.foscam_wohnen

Posts: 15

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 101976

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>