Condition for automation (Is this right state)

Hi

I just want to make sure this condition is correct, is it state: 'away' and to: 'away' for trigger?

  - condition: state
    entity_id: group.home_devices
    state: 'away'

Whole Automation

- id:  Door Bell Dog
  alias: '[Doorbell] Speical - DOG'
  trigger:
  - event_data:
      click_type: single
      entity_id: binary_sensor.switch_158d0001ae7587
    event_type: click
    platform: event
  condition:
  - after: 09:00:00
    before: '17:00:00'
    condition: time
    weekday:
    - mon
    - tue
    - wed
    - thu
    - fri
    - sat
    - sun
  - condition: state
    entity_id: group.home_devices
    state: 'away'
  action:
    service: script.turn_on
    entity_id: script.dog_bark

I use this

state: 'not_home'

not sure if 'away' will work.

1 Like

You need to look in your ‘states’ page at the ‘group.all_devices’ to see what the states are. if it says ‘away’ there then use ‘away’. if it says ‘not_home’ then use that.