Temperature sensor not reliable

Using a template trigger is similar to a normal trigger. It also won’t “always” fire. What does that even mean? That the automation should perform the action every millisecond? Suppose you put a notification in the action, you do not want an endless stream of those.

As jou just realised from Automations #1: trigger only fires when it changes from not true to true - #4 by Stiltjack, a trigger is something happening, something becoming true. A condition is something being true. It is an “extra” check, as you said, but adding extra checks adds extra things you need to think about.

EDIT: That is why I added the below explanation to the wiki topic above. If you read that, you’ve read the below already:

If A and B need to be true for something to happen, then there are two ways that trigger (pun intended) both A and B both being true. If A becomes true, and B is already true, or if B becomes true and A is already true.

The general format for multiple conditions is:

trigger:
  A becomes true
  B becomes true
  C becomes true
  ...
condition:
  A is true
  B is true
  C is true
  ...
action:
  do something

I know this feels like double work, but remember only one trigger can fire at the same time, so you always need to check the other things too. With one condition, you only need one trigger, because it proves the only condition is already met.

A template trigger can help, because the template only becomes true ‘when all the stars align’ so to say. a template trigger {{ A and B and C }} will only become true once all is as it should be. So using (only) that you do not need a condition. But still, this does not “always” fire.

Always triggering would make it impossible to intervene. So event based, how it is now, is actually better suited for everything that is not absolutely critical to get right 100% of the time. For instance, an automation to turn the light off when there is no motion should not always fire, because you want to be able to turn the light on manually too. Motion sensors aren’t perfect. And especially in a home, you often cannot, or do not want to, write an automation that takes every situation into account. A home is not like a factory.

A time trigger often seems like an alternative to the “always fire” thought. But in fact, it is a worse way. If you check too often, HA is busy doing nothing all the time. Write 200 of those automations, and it is becoming messy soon. If you check infrequently, the automation is very slow to respond. Checking every 5 minutes implies you may need to wait almost 5 minutes for something to happen.

Using triggers as suggested works instantaneously, only in the situation intended, and leaves room for other automations (or people) to act on the same thing too.

2 Likes