Switch to Disable/Kill all Automations

Hello.
I often have friends and family staying with us and I’d like to have an override switch on my dashboard to disable a large number of my automations (i.e. stop the Roomba from starting, or lights automatically turning on in areas of the house, etc).

I’m very much a newbie to Home Assistant (but am a coder, so can get my hands dirty) so wasn’t sure how to approach something like this?

create an input_boolean (called “helpers” for some reason) called “guest mode” (input_boolean.guest_mode).

Then in all of the automations you want turned off just put that the state of the input_boolean to be ‘off’ in order for the automation to execute.

condition:
  - condition: state
    entity_id: input_boolean.guest_mode
    state: 'off'

then when you have guests turn on that input_boolean.

6 Likes

Ahh, that’s brilliant.
I was wondering how you’d approach storing state - looks like I need to read up more about helpers :stuck_out_tongue:

Thanks

1 Like

Another option would be to create a group with all your automations, then have a switch to toggle the group.

Right - so whenever you add a new automation to the group, it’ll just have that rule applied within HA.
That’s neat, considering you don’t need to touch any code

1 Like

I use an input_boolean as condition for that as well.

I have some automations which are always triggered but execute different actions when I have visitors.

For example:
When I receive a message I only get notified about that when I have visitors. But when I’m alone the text is read to me.

1 Like

Don’t turn on/off automations as a normal means of controlling when they should or shouldn’t be operational. In other words, when you need a “mode”, where some automations are enabled and others disabled, use an input_boolean in the automation’s condition (as suggested by others).

Why? Because it provides better flexibility and control. You get two ways to control an automation’s execution and each one represents a different reason. The input_boolean is used for modal control (a car’s transmission or brakes) and the other when it should be rendered inoperative (a car’s ignition switch).

Create a card listing all of your automations, include “show_header_toggle: true” and this will give you a card showing the status of each automation (on/off) and a single switch at the top to turn them all on or off. (You can individually toggle each automation also).

      cards:
        - type: entities
          title: Exterior
          show_header_toggle: true
          entities:
            - entity: automation.backyard_motion
              icon: mdi:motion-sensor
            - entity: automation.carport_motion
              icon: mdi:motion-sensor
            - entity: automation.driveway_motion
              icon: mdi:motion-sensor
            - entity: automation.east_porch_motion
              icon: mdi:motion-sensor
            - entity: automation.storage_shed_motion
              icon: mdi:motion-sensor
            - entity: automation.tool_shed_door_open
              icon: mdi:door-closed
3 Likes

How can you use an input_boolean when using a Blueprint like for an Aquara mini switch?
I have no where to add the condition…

Share the Blueprint (or the link for that Blueprint) and I might be able to help.

Thx Edward, I use the “ZHA_Aqara_Wireless_Mini_Switch.yaml”
ZHA - Aqara Wireless Mini Switch

Ok, but I believe this one is controlling the button you want to use to disable other automations, is that right? In this case, I would need one of those automations which would be disabled so I can show you how to change those.
Can you share one of the automations or blueprints you want disabled? Or this is not what you are trying to achieve?

Not exactly, I woul like to add a condition to this blueprint so that the butoon would not allow the action to run.

Example: This blueprint is linked to an Aqara mini zignbee switch, that whem pressed opens the garage door. Thios button is mounted in my car, and when my car can not be parked in my garage for instance when my wife’s EV needs to be charged, then I would like my Aqara button not to allow to open the garage door

FYI, I tested my own alteration and it works like a charm.
Thx to all who gave their thoughts and ideas.

`alias: "Button: Garage door (car)"
description: ""
condition:
  - condition: state
    entity_id: input_boolean.car_jurgen_parked_outside
    state: "off"
use_blueprint:
  path: jurgend/ZHA_Aqara_Wireless_Mini_Switch.yaml
  input:
    aqara_mini_switch: 8bb1************************4076
    button_single_press:
      - service: cover.toggle
        data: {}
        target:
          entity_id: cover.garage_door`

Thanks - question!
Can you programmatically generate that card using a template that returns all list of automations?

Add the auto-entities card from HACS and then use this for your card…

type: custom:auto-entities
card:
  type: entities
filter:
  include:
    - entity_id: automation.*
  exclude: []
1 Like