Some automations not triggering - But all the same trigger

I dont have the YAML on my right now as I am not in front of the machine. But I have 3 separate automation triggered by a door sensor. They all used to all work, now only one automation works (no changes to the YAML), only change was a HA software update.

If I trigger manually it worked fine so the action works. I have also tried to run the automation with the conditions removed and it automation still wont trigger.

Anyone experienced something like this, or any breaking changes that might cause this strange action?

Need more info!

HA Update from which version did you update from?

Most importantly, need to see the YAML before anyone can help you.

1 Like

As Andy said, we need to see the YAML.

There were lots of breaking changes regarfing automations, especially in the last 2-3 releases. It really depends from which version you updated. For the future, I’d advise you to read the breaking changes BEFORE you update, and update release by release.

Here is the yaml:

This one doesn’t fire.

- alias: Voice command for when gate tag box is opened. 
  initial_state: true
#  hide_entity: false
  trigger:
    platform: state
    entity_id: binary_sensor.wyzesense_778be928
    from: 'off'
    to: 'on'
  condition:
    condition: state
    entity_id: input_boolean.gate_tamper_boolean
    state: 'off'
  action:
  - service: tts.google_translate_say
    entity_id: media_player.security_office_speaker
    data:
      message: 'State why the entrance gate tag is being used.

Also doesn’t run (I know i change to closed/open to on/off didn’t make a difference)

- alias: NX Bookmark when gate tag is opened
  initial_state: true
#  hide_entity: false
  trigger:
    platform: state
    entity_id: binary_sensor.wyzesense_778be928
    from: 'closed'
    to: 'open'
  condition:
    condition: state
    entity_id: input_boolean.gate_tamper_boolean
    state: 'off'
  action:
  - service: rest_command.entrance_gate_tag_box_opening_request

This one runs without issue.

- alias: Start gate tamper timer
  initial_state: true
#  hide_entity: false
  trigger:
    platform: state
    entity_id: binary_sensor.wyzesense_778be928
    from: 'off'
    to: 'on'
  action:
    - service: input_boolean.turn_on
      entity_id: input_boolean.gate_tamper_boolean
    - service: timer.start
      entity_id: timer.gate_tamper

What is even more confusing is that I have the same group of 3 automation for another door, and it runs all 3 without issue.

You probably have a race condition between the first and the last automation. Both trigger when the same binary_sensor changes from ‘off’ to ‘on’. The last automation turns on the input boolean and therefore the first automation will never trigger, because it has a condition that the input_boolean needs to be ‘off’.

Its just so odd as it used to work before.
I could rewrite this in a better way with the new automation updates that make the tamper unnecessary.

Funny thing is, I have another switch running the same set of automation and it still works fine.