Cannot trigger via group state

Hi - newbie here. Im using v0.117.1.

I’ve setup a group that tracks the state/presence of all people in the house. This works and the group moves between Home/Away as expected.

However, I cannot seem to trigger an automation based on that state. The intention was to arm the blink cameras, but for troubleshooting purposes, ive also tried to get it to simply switch a lamp on/off (which I know works via the sunset automation),

(automations.yaml)

  • id: ‘1604318683676’
    alias: Arm blink when away
    description: ‘’
    trigger:
    • platform: state
      entity_id: group.people
      to: “Away”
      condition: []
      action:
    • type: turn_off
      device_id: bf01d3acb810b1eb79163ae6e4785451
      entity_id: switch.living_room_lamp
      domain: switch
      mode: single

(groups.yaml)
people:
name: people
entities:
- device_tracker.russ_tracker
- device_tracker.yvette_tracker

I see the group status change in the logbook " [people] changed to Away by [russ_tracker]" but the automation doesnt trigger.

I’ve tried various different states in the automation with quotes and double quotes, away vs Away, not_home etc… but no success.

I’m new to HA, so im probably doing something wrong, but any help appreciated,

Thanks!

Welcome. Please edit your post and format your pasted code as per point 11 here.

Then go to developer tools / states menu and check what the actual state of your group is.

Away in your state trigger should probably be not_home.

What is displayed in human friendly terms in the Lovelace frontend is not always the state of an entity. Another example is a binary sensor. Its state is always on or off but can display as moving, clear, detected, and a whole bunch of other things depending on the device class applied to it.

1 Like