#Can you not use trigger ID in "And if"? Automation never triggers because sequential of condition

1 messages · Page 1 of 1 (latest)

left forge
#

Trying to turn my balcony lamps on and off in a single automation.

The first condition is true, with balcon-on trigger. I expect it to go to actions. But it then continues with each condition check, defeats the purpose of trigger-id. What am i doing wrong?

alias: "Balkon: lamp aan"
description: ""
triggers:
  - trigger: sun
    event: sunset
    offset: 0
    id: balcon-on
  - trigger: time
    at: "22:30:00"
    id: balcon-off-week
  - trigger: time
    at: "00:00:00"
    id: balcon-off-weekend
conditions:
  - condition: and
    conditions:
      - condition: trigger
        id:
          - balcon-on
      - condition: time
        before: "22:30:00"
        enabled: false
  - condition: and
    conditions:
      - condition: trigger
        id:
          - balcon-off-week
      - condition: time
        weekday:
          - thu
          - wed
          - tue
          - mon
          - sun
  - condition: and
    conditions:
      - condition: trigger
        id:
          - balcon-off-weekend
      - condition: time
        weekday:
          - sat
          - sun
actions:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - balcon-on
        sequence:
          - type: turn_on
            device_id: 7dd0f09a9e40391ea5137f51f952c62d
            entity_id: 0b2de1f06d454dea4b691a1619301ec8
            domain: switch
      - conditions:
          - condition: trigger
            id:
              - balcon-off-week
              - balcon-off-weekend
        sequence:
          - type: turn_off
            device_id: 7dd0f09a9e40391ea5137f51f952c62d
            entity_id: 0b2de1f06d454dea4b691a1619301ec8
            domain: switch
mode: single

azure slate
#

The list of conditions you have must all be met in order for it to reach the action part of the automation.

I'd suggest moving your conditions into your choose conditions.

solar maple