WTH why is it not possible to enable/disable automations with helpers

Idea: The ability to enable/disable an automation based on certain criteria.
Example: Friends come over so i set the input helper party_mode to true. Certain automations that are linked to that helper then disable. The shades don’t automatically close at 10PM possibly locking someone on the balcony.
Yes, I know this is technically possible with conditions, but having the option to link automations to certain helpers would be way more accessible and also cleaner. Click on an input helper and having a list with linked automations seems way nicer to me.

Edit:
Especially when you have lots of different conditions for automations that are independent of the actual logic this would be very helpful. Something like this.

party_mode
[Automations]
   - auto_shading_control
   - auto_ventilation_shutdown

vacation_mode
[Automations]
   - presence_simulation
   - arming_alarms

Should be feasible already (without using conditions, though that’s really the best method). I have an automation that I disable/enable by way of another automation during my ‘work hours’ because it’s not needed during those times.

I use the automation turn off and automation turn on service calls to do this. Looping over some text list would be easiest. Unfortunately, we don’t have a list helper (yet).

See this WTH and this WTH for what may end up being the “solution” to this. Though, just creating a “list” helper type may be the ultimate solution. I would think it would be similar, though different from the dropdown helper that already exists.

I really had the dropdown helper in mind with this. Setting my house into vacation_mode for example to disable all automations that use energy and enable presence_simulation. Or to set it in party mode etc etc.

I mean you could just make a different automation.

alias: Mode -> Automations
trigger:
  - platform: state
    entity_id: input_select.house_mode
variables:
  mode_map:
    party_mode:
      turn_on:
        - auto_shading_control
        - auto_ventilation_shutdown
      turn_off:
        - presence_simulation
        - arming_alarms
    vacation_mode:
      turn_on:
        - presence_simulation
        - arming_alarms
      turn_off:
        - auto_shading_control
        - auto_ventilation_shutdown
action:
  - parallel:
      - service: automation.turn_on
        data:
          entity_id: >-
            {{ mode_map[triggers.to_state.state].turn_on | map('regex_replace', '^', 'automation.') | list }}
      - service: automation.turn_off
        data:
          entity_id: >-
            {{ mode_map[triggers.to_state.state].turn_off | map('regex_replace', '^', 'automation.') | list }}

I don’t like turning automations on and off personally, I prefer all the logic be in the automation. But if you want something outside to control it, this’ll do it. Then you can just look at this one automation to see a list of what automations turn on and off for each mode.

1 Like

or just a template select

1 Like