Why the heck can't I turn off automation groups AND stop actions running in those groups?

I have a group that contains all motion-activated lighting automations in my house, and I would like to turn those off when I go to bed. However, those lighting automations have a 10 minute timer, after which they turn the lights to a lower brightness (150 out of 255) to indicate that the lights are turning off if I don’t move. This means that when I go to bed, after a few minutes, the lights turn back on in the rooms that I was just in! The running automations don’t get terminated! I could call all of them separately, but that means I would need a double administration of all lighting automations in my house.

Please add the option to call groups of automation to the ‘automation.turn_off’ service that simply passes the turn_off command to the group members.

From what I understand about the recent automation changes, when you turn off an automation it cancels the actions. This should be working the way you want already. Are you in the latest release?

But it’s not possible to add groups as entities to the service automation.turn_off, which is what I’m looking for. I call homeassistant.turn_off, which doesn’t cancel the actions. I’m on 0.113 btw. If this feature was introduced in 0.114, my apologies.

The functionality was added in .114 as an option for automation.turn_off. A simple homeassitant.turn_off most likely invokes the stopping of an automations actions because it calls the domains turn_off service. By default, turning off an automation will stop_actions.

If it doesn’t work using the homeassitant.turn_off in 0.114 (unlikely), you can use a template to solve the issue:

- service: automation.turn_off
    entity_id: >
      {{ expand('group.xxx') | selectattr('domain','eq','automation') | map(attribute='entity_id') | list | join(', ') }}
1 Like

Okay. I’m gonna upgrade and check. Thanks for the help! :slight_smile: