Automation Not Triggering Help

Hello

I’ve tried setting up an automation to use my Aqara motion sensor lux to trigger an automation but running into issues where its not running. Hoping someone can see where I’m missing out on having it trigger properly

id: ‘1642903736907’
alias: Evening Lights
description: ‘’
trigger:

  • type: illuminance
    platform: device
    device_id: 12111acfd9369299ed9bf28876794038
    entity_id: sensor.living_room_motion_sensor_illuminance_lux
    domain: sensor
    below: 45
    for:
    hours: 0
    minutes: 0
    seconds: 0
    id: Lights On
  • platform: time
    at: ‘00:30:00’
    id: Lights Off
    condition:
  • condition: time
    before: ‘23:30:00’
    after: ‘15:30:00’
    action:
  • choose:
    • conditions:
      • condition: trigger
        id: Lights On
        sequence:
      • service: light.turn_on
        data:
        brightness_pct: 20
        target:
        entity_id: light.tv_stand_lighting
      • service: light.turn_on
        data: {}
        target:
        entity_id:
        - light.dining_room_light
        - light.living_room_light
        enabled: true
    • conditions:
      • condition: trigger
        id: Lights Off
        sequence:
      • service: light.turn_off
        data: {}
        target:
        entity_id: light.tv_stand_lighting
        default: []
        mode: single

Thanks in advance

What does the automation’s trace report?


NOTE

Please format your automation.

Reference: FAQ Guideline 11 - Format it properly

Triggered by the numeric state of sensor.living_room_motion_sensor_illuminance_lux at January 4, 2023 at 3:08:31 PM

time condition

Stopped because a condition failed at January 4, 2023 at 3:08:31 PM (runtime: 0.00 seconds)

I’m wondering is this saying that the time condition stopped the automation running?

If so if I only want to lights to come on after a set time during the day would I set the condition under conditions or under actions and the condition section there?

Your automation’s Time Condition checks if the time is between 15:30 and 23:30. In other words it’s checking if the time is between 3:30 PM and 11:30 PM and the automation was triggered at 3:08 PM which is not within the time range you specified.

1 Like

Ok makes sense so if I only want it to run at a set window of time so the lights don’t come on early can I use the time condition under the action of the lights?

Yes.

1 Like

Thanks so much for the help clearing things up for me.

1 Like