#Automation not executing even though conditions are met.

1 messages · Page 1 of 1 (latest)

covert sail
#

No trace available as its not executing. The sensors in here show not occupied, for over a minute. Yet the automation is not firing and i dont understand why. I have the same automation for a other room that works fine and reliably.

Sometimes though but rarely, the automation works.

Yaml:

description: ""
triggers:
  - type: not_occupied
    device_id: 14465199d72f6102592cbd04e41d67e9
    entity_id: 8e13ab9284741d268a13b609342c8bf8
    domain: binary_sensor
    trigger: device
    for:
      hours: 0
      minutes: 0
      seconds: 8
  - type: not_occupied
    device_id: 1d3ecb692589f661b2a239c0855144f4
    entity_id: 0926e8e82101088c54e7bd97cade1976
    domain: binary_sensor
    trigger: device
    for:
      hours: 0
      minutes: 0
      seconds: 8
conditions:
  - type: is_not_occupied
    condition: device
    device_id: 14465199d72f6102592cbd04e41d67e9
    entity_id: 8e13ab9284741d268a13b609342c8bf8
    domain: binary_sensor
    for:
      hours: 0
      minutes: 0
      seconds: 8
  - type: is_not_occupied
    condition: device
    device_id: 1d3ecb692589f661b2a239c0855144f4
    entity_id: 0926e8e82101088c54e7bd97cade1976
    domain: binary_sensor
    for:
      hours: 0
      minutes: 0
      seconds: 8
actions:
  - action: light.turn_on
    metadata: {}
    data:
      transition: 1
      brightness_pct: 45
    target:
      entity_id:
        - light.living_room_cherry_blossom_painting
        - light.asian_lamps
  - action: light.turn_on
    metadata: {}
    data:
      brightness_pct: 50
      transition: 1
      kelvin: 4964
    target:
      entity_id:
        - light.yeelight_dining_room_ambilight
  - action: light.turn_off
    metadata: {}
    data:
      transition: 1
    target:
      entity_id: light.yeelight_dining_room
mode: single
#

The mmwave sensor clearly goes on, then off. Yet the automation wont execute

cobalt mulch
#

For 8 seconds?

covert sail
#

Yet wont execute for some reason

bronze umbra
#

I’d check the history of the sensor to make sure it’s not toggling states quickly inside that 8 seconds (it’s set to 8 seconds throughout your yaml…)

Does the automation work if you remove the time entirely?

I’d also try disabling your condition and seeing if the automation fires then.

covert sail
#

The two conditions are exactly the same as the triggers

#

Il try to disable conditions and remove time and see if it works. In the status of the both devices it says no detection since x minutes, yet lamps are still on(automation didnt fire)

ember flicker
#

You’ll get a trace if a trigger fires but conditions (in the conditions section) are not met. If you have no trace then a trigger never fired.

mint nebula
# covert sail No trace available as its not executing. The sensors in here show not occupied, ...

Hi @covert sail,
I suspect the problem is single mode.
If the 2 sensors timeout virtually the same time, one will trigger, find the 2nd one has not timed out yet and before that is done, the second tries to trigger it but is rejected because it's in single mode so it doesn't fire.
Personally I would add a trigger_id to both, then each condition checks that the other trigger's entity to make sure it timed out as well.

covert sail
mint nebula
#

Try changing it from single mode to queued mode.

#

I was explaining what I thought is happening.

covert sail
#

Didnt work

#

This turns the lights on

#

This dims them at no activity