Automation from state change not triggering?

I have a sensor on my door that when opened, sets a boolean presence value to true. A second automation (should) triggers when that value changes to true.

However, it seems that sometimes this doesn’t trigger…

  • alias: bedroomdooropen
    trigger:
    • platform: state
      entity_id: binary_sensor.door_window_sensor
      to: ‘on’
      action:
    • service: input_boolean.turn_on
      entity_id: input_boolean.bedroompresence
  • alias: BedroomOn
    trigger:
    • platform: state
      entity_id: input_boolean.bedroompresence
      to: ‘on’
      action:
    • service: switch.turn_on
      entity_id: switch.amplifier -turn on lights etc. blah
      etc…

can you format your code using the markup language please (see the blue bar on top of the page)
Also may be a stupid question but why have 2 automations? Why can’t you set both actions in one automation?

1 Like