Just wondering if anyone can advise me on triggering an automation before the specified time? I am using the time component to match the time of my sensor and then it fires the automation.
However I experience 5-8 seconds lag with the time component and would therefore like to adjust this issue by triggering my automation 5-8 seconds early so that everything is in sync.
I do use time as a trigger in automations. I never checked for considerable lag as those automations are not time critical and don’t have to be executed by the second. How do you notice the 5 second lag?
I noticed the lag when the automation triggers. So e.g. if the text file is at 18:00 and when the time sensor hits 18:00 the automation does not trigger by the second rather it triggers after 5-8 seconds.
I noticed this lag with the time sensor itself i.e. when the minute changes it does not change and has a lag of 5-8seconds. So it could be the reason why the automation has a lag.
Do you know how I could reduce the time in seconds ?
Just to jump in, I think the 5 second lag you are talking about is unavoidable, since there is some time involved in sending the message to the cloud and it arriving at your phone (I am assuming iOS notifications and these are not processed locally, the cloud is involved).
I, for example, am not using a time-comparison trigger as you are; I send a notification when my garage door opens. Sure enough, the door opens, and several seconds later I get the notification.
Exactly. Whatever notification service you are using, it always will have some sort of delay, shorter or longer. So, using HA as a tea timer might not be the best idea. But that is not HAs fault but rather cause by the accumulation of latencies of different systems being used.
I am certain it’s nothing to do with the notification instead it’s the time component which is the issue as I have monitored it and when the minutes changel the time on HA frontend lags for about 5 seconds.
What’s exactly the problem? What are your trying to do that 5 seconds delay/lag is such a big issue for getting notified? Which notification component are you using?
I have tried to implement it and this is what I have come up with but gives me error in this line {{ is_state('sensor.manutd', is_state('sensor.time')) }}