Last active
August 5, 2023 20:42
Home Assistant Hot Tip of the day: home occupancy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This condition will be true if your home is empty | |
condition: | |
- condition: state | |
entity_id: zone.home | |
state: "0" | |
# This condition will be true if your home is occupied | |
condition: | |
- condition: numeric_state | |
entity_id: zone.home | |
above: "0" | |
# This condition will be true if your home is full (all persons are present) | |
condition: | |
- condition: template | |
value_template: "{{states('zone.home')|int == expand(states.person)|list|count}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This will be triggered when your home becomes empty | |
trigger: | |
- platform: state | |
entity_id: zone.home | |
to: "0" | |
# This will be triggered when your home becomes occupied | |
trigger: | |
- platform: state | |
entity_id: zone.home | |
from: "0" | |
to: "1" | |
# This will be triggered when your home becomes full (all persons are present) | |
trigger: | |
- platform: template | |
value_template: "{{states('zone.home')|int == expand(states.person)|list|count}}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment