Automations trigger every X seconds/minutes - how bad is it?

So, im new to HA automations. I keep seeing people say automations (and template sensors) that trigger every X seconds/minutes is bad as if the world would end. But i havent yet found much documentation around HOW BAD this is.

Using proper triggers seem easy enough, but i cant shake the idea of how unreliable any important automation would be if HA happen to restart or any hiccup that would cause the trigger to not fire. Instead, if i use sort of a state based template or a trigger based automation with an additional trigger every X minutes/seconds as a fallback, it would ensure what ever automation or template gets execute regurdless of any hiccups or HA restarts (as the template would trigger the next time the state becomes available or next time the time based trigger executes).

Doing what im suggesting is a HUGE waste of resources if i assume no hiccups and no HA restarts etc. But the main point is that, does it make that huge of a difference? Its simply that the template re evaluates lot more often, but its not like any template/automation actually uses up any meaningful amount of system resources - right? If im correct then, it would be such an insignificant cost to pay for a slight bit more reliability and fallback logic.

Am i somehow completely wrong to assume that? Am i missing something?

Example automation:

V1. Automation without fallback:
If sensor is on => turn on light
if sensor is off for 5 minutes => turn off light

V2. Automation with fallback:
If sensor is on => turn on light
if sensor is off for 5 minutes => turn off light
Every 30 seconds => if sensor is on => turn on light; if sensor is off for 5 minutes (using templates and sensor.last_changed comparing with now()) turn off light.

Not the best example, but in this, the V2 will recover from a HA restart eventhough now() only evaluates every minute, it would still EVENTUALLY turn off the light.

If the goal is to insure something turned on is turned off, Timers can be utilized.

I’m not all that knowledgeable, but in the year I’m working in HA I found I needed a Timer to insure my coffee maker or light groups would shut off after being triggered on. They normally would, but as I have been working in HA and would restart it often, that would abort any automations in progress (like motion automations).

I could be wrong as to what Timers could bring in the gist of what you’re asking. But it sounded familiar, wondering how bad it is to do something generally ill-advised.

Normal automations can be made to work as intended even if a restart happens.
You can trigger on Home Assistant start.
Creating one automation that uses time pattern is not an issue, but a lot of those who use time pattern use them way to extensive.

With that out of the way, let me now explain why your logic is not better than a standard automation.

So your worry is that if HA restarts then this will not trigger?
All sensors go unavailable or unknown when HA boots up and when start is done then the sensor will be on thus triggering the automation. So your every 30 seconds trigger will not do anything but load HA with an unnecessary task.
And the same will happen with the off. If the sensor is off or becomes off then it will trigger

@bob.t yeah ive seen that video and have considered timers as well. Its a solution, i dont disagree. But to create a timer entity for EVERY SINGLE AUTOMATION just defeats the point - specially if you want to create some quick blueprints for your own simple automations (you cant reallu automate creating the timers). If you happen to do triggers on X time and use time comparisons on the actions or state (if template sensor), then at the cost of some compute power (seemingly insignificant amount of compute power?) you can do the same/similar solution with a much more encapsulate solution with ability to easily clone/duplicate/blueprint your end result.

Fair enough (i figured HA restart may make a sensor go into unavailable before setting state but i havent done enough tests to verify this). This is why i said my example is not very good, but i just couldnt come up with a good scenario at the time. But the idea is the same, if you want to ensure something does what its supposed to, you should ensure some level of fault tolerance by potentially rechecking. Maybe ill come up with a better scenario later.

Either way, the question here is more that - sure adding time based triggers MAY “load HA with an unnecessary task” (no one disagrees with this other than maybe the use of the word ‘unnecessary’), but do we or should we care unless you are running HA on a potato? Correct me if im wrong, im suspecting that the performance difference of adding a bunch of timed trigger automation to HA is equivalent to having a car that runs 60 mpg reduce efficiency down to 59.9999 mpg because you added an extra weight of am umbrella to the car. Or am i way off here, because i have not seen any discussions about performance hits on timed triggers other than people claiming that its like the end of the world to do so.