Automation always choosing 'default'

I followed this post and created an input_select that changes depending on when we are home or not. it is working great so far. Now that i have that working, i wanted to create an automation that turns on the lights when that input select changes to ‘Just Arrived’ and then turns them off when it changes to ‘Home’. this is only supposed to happen in the evenings. i created the below automation, but whenever the input_select changes, it always chooses the default action. i am sure i am missing something simple, but i just can’t peg it. I’ve changed the trigger id’s to something simple (before they had dashes), but that did not help. Any hints?
Here is the automation:

alias: LOCATION - Arriving Home Outside Lights
description: ''
trigger:
  - platform: state
    to: Just Arrived
    id: arrival
    entity_id: input_select.status_sebastian
  - platform: state
    entity_id: input_select.status_ida
    to: Just Arrived
    id: arrival
  - platform: state
    entity_id: input_select.status_ida
    id: home
    to: Home
  - platform: state
    entity_id: input_select.status_sebastian
    id: home
    to: Home
condition:
  - condition: numeric_state
    entity_id: sun.sun
    attribute: elevation
    below: '-3'
action:
  - choose:
      - conditions:
          - condition: trigger
            id: arrival
          - condition: state
            entity_id: switch.outside_lights
            state: 'off'
        sequence:
          - service: switch.turn_on
            data: {}
            target:
              entity_id: switch.outside_lights
          - service: input_boolean.turn_on
            data: {}
            target:
              entity_id: input_boolean.automated_outside_lights
          - service: notify.haapp_sebs_devices
            data:
              message: Someone Arriving Home, turning lights on outside
      - conditions:
          - condition: trigger
            id: home
          - condition: state
            entity_id: switch.outside_lights
            state: 'on'
          - condition: state
            entity_id: input_boolean.automated_outside_lights
            state: 'on'
        sequence:
          - service: switch.turn_off
            data: {}
            target:
              entity_id: switch.outside_lights
          - service: input_boolean.turn_off
            data: {}
            target:
              entity_id: input_boolean.automated_outside_lights
          - service: notify.haapp_sebs_devices
            data:
              message: >-
                Turning outside lights off after 10 minutes from someone
                arriving
    default: []
mode: single

Here is an image of the trace:

Check the switch and the input boolean and test it without conditions.

2 Likes

It was the switch! I had created it in YAML to group some lights and it was not configured correctly. I created a group in the UI and now it is working. Thanks!

1 Like