For every automation i use i have to make an on and off automation, i know you can combine the 2 automations for less clutter in the automations tab. Any help?
Remove the from and to in trigger.
Then add in the actions a choose where you check if person is home, then add the call services, and then another choose and if not_home with the respective call services.
But mind that not_home is not the same as at work/school and so on.
If you want not home then do template comparison with {{ states(person) != 'home' }}
thank you for the super quick solution this is perfect for toggling everything on and off when i leave the house! Also how do you post code in that text like the font and grey highlight?
So with all you have given me this automation does work. But the only issue is with the home condition being home instead of changing to home, it cannot tell the difference between coming home and being home
alias: jonahs room
description: ‘’
trigger:
platform: state
entity_id: person.sean
condition: []
action:
choose:
conditions:
condition: state
entity_id: person.sean
state: home
sequence: