Not all actions triggering in automation

@123 I can verify that if its your config or my original config if the sensor triggers the automation:

  • If the switch is first
    • Only the notify action occurs
  • If the notify is first
    • Both actions occur

If anything else triggers the automation (manual trigger, manual state change, operating the switch, both actions are taken.

I think the most revealing result is the last one you mentioned: the problem never occurs if the automation is activated manually. If the automation is activated by its trigger, then the problem occurs (but only if the switch action is first).

When an automation is activated manually, its trigger (and condition, if any) is skipped. That means there’s no checking of the temperature or the switch’s state.

Try one more thing, remove the test for the switch’s state:

    value_template: >
      {{ states('sensor.vision_security_zp3111_multisensor_4in1_temperature') | float > 89.9 }}

This is to determine if there’s any ‘quantum entanglement’ :slight_smile: between the act of testing the switch’s state and the act of setting the switch’s state. The two shouldn’t influence each other and this test should prove/disprove it.

Done. I’ll let you know shortly.