PSA: Turn on/off all lights in Home Assistant 0.104+ (group.all_* changes)

What about some tiny python_script to get your group.all_* back?

automation:
  - alias: HA Start automation
    trigger:
      platform: homeassistant
      event: start
    action:
      - service: python_script.create_all_group
        data:
          domain: light
          group: all_lights

python_scripts/create_all_group.py

domain = data.get('domain')
group = data.get('group')

service_data = {"object_id": group, "entities": hass.states.entity_ids(domain)}
hass.services.call("group", "set", service_data, False)

I have no clue if this is safe, but it works for me. :sunglasses: It is!

EDIT: optimized create_all_group.py

5 Likes