- alias: People not home
id: 'People not home'
# initial_state: 'on'
trigger:
platform: state
entity_id: group.grand_family
to: 'not_home'
for:
minutes: 10
condition: []
# condition: template
# value_template: >
# {{ is_state('input_boolean.guest_mode', 'off')}}
action:
- service: script.leave_home
- condition: template
value_template: >
{{ is_state('input_boolean.notify_presence', 'on')}}
- service: notify.notify
data_template:
message: >-
{{as_timestamp(now()) | timestamp_custom("%X") }}:
Emtpy House, securing the premises.
of course you have to adapt things, but the main system could be like this.
in the script you could do anything you want. switch of all automations, or a subset you’ve declared for that.
Easiest thing to do that is create a group with automations, and switch of/on that group.
in above automations all is done automatically reading the state of the group.grand_family, which holds all devices.
you could of course also do it manually by flipping an input_boolean.
many many variations possible, so start and see where you want to alter setup to your needs.
depending on the automations in the system, i wouldn’t advice to do so, it would stop HA from working completely.
it should be fairly easy to throw some relevant automations in a dedicated group to switch on/off, and keep the rest of the system automated