issue is this triggers every time I reboot HA or reload automations.
Now I think issue is the topic is published with retained flag which in anycase I need (to retain the message) for other reasons.
Topic is:
2020-07-19 09:31:57
so basically a date.
how can I make such that, retaining it, automation does not trigger? any suggestion?
Though by the documentation you can set the units to days (default), hours or minutes
So I don’t think 5 seconds is doable.
You may have to create a boolean (default) on and reset it x seconds after a restart or something like that.
So usage of uptime is clear to me.
The fact is when I reload automations the automation triggered by the MQTT topic subscribe again to it and this triggers the automation itself.
Uptime (I set 5 minutes as condition) works fine to prevent it triggering upon HA restarts, but not in case of automation reload.