I have been trying to wrap my head around the away/vacation mode. Doing some trail and error I have it partly working. At the moment I have this:
I am tracking persons using the companion app, and that seems to work pretty okay. Zone.home gives me the correct number of family members being at the house too. I made two groups that show whether everybody is home or somebody is home. The code for that looks like this:
somebody_home:
name: Somebody is home
entities:
- device_tracker.huawei_p30_pro_van_con
- device_tracker.opponancy
- device_tracker.oppo_rik
all: false
everybody_home:
name: Everybody is home
entities:
- device_tracker.huawei_p30_pro_van_con
- device_tracker.opponancy
- device_tracker.oppo_rik
all: true
These groups give me Home or Away status. Is it possible to use True or False instead? Now, based on either “somebody home” or “zone.home” I want to flip the “input_boolean.no_one_home_mode” to ON or OFF. I have tried this:
- id: '1682512656631'
alias: Auto State ON nobody home
description: ''
trigger:
- platform: state
entity_id:
- zone.home
attribute: persons
to: '0'
condition: []
action:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.no_one_home_mode
- id: '1682513575229'
alias: Auto State OFF nobody home
description: ''
trigger:
- platform: state
entity_id:
- zone.home
attribute: persons
from: '0'
condition: []
action:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.no_one_home_mode
But it does not work. It won’t flip.
Due to the many different approaches I find it hard to choose the best one for this “easy” task.
Any ideas to what I need to do better?
Thanks!