I have create the input-boolean and I must be missing something because when my wife or I get home the boolean says in the off postion, Here is my automation:
alias: Trigger
trigger:
- entity_id: device_tracker.dad_phone
from: not_home
platform: state
to: home
condition:
- condition: state
entity_id: input_boolean.dad_home
state: 'on'
- condition: state
entity_id: device_tracker.dad_witcher
state: home
action: []
- id: '1528491794579'
alias: Melissa Home
trigger:
- entity_id: device_tracker.mom_witcher
from: not_home
platform: state
to: home
- entity_id: input_boolean.mom_home
platform: state
to: 'on'
condition:
- condition: state
entity_id: device_tracker.mom_witcher
state: home
action: []
Do you need a switch to force home and away? Or just a boolean sensor that shows it.
If the first, then you shouldn’t use automation. I guess.
If the latter, use my suggestion. Create a group of trackers. The group will be ‘home’ when at least one of the trackers is at home. You don’t need to do anything for that. You can show the group in the UI or create a binary template sensor that changes state when the group changes state.
HA already creates a group called group.all_devices once you have device tracking set up. This will report as ‘home’ if any of the devices in that group are home as @metbril has said above. You can use the state of that group entity for automations etc.
I do not need to be able to turn on / off. I have device_tracker running and it does show underneath the icon home / away / work. I am extremely new to HA and the videos that I am using are from late 2016 to early 2017 so there may be a lot of updates since these were produced. Most of these use the input_boolean toggle to trigger automation so that is what I am trying to replicate. But if I would be better off using the device_tracking feature I will look for references on that.