Automation Last Triggered is always null

None of my automations have a last triggered set even for those I’m seeing running (likewise my xiaomi binary sensor switches don’t get last_updated/changed updated when they are pressed). Am I missing something?

I’m basically hoping to stop automations running immediately one after another if you press the button twice by accident and was hoping to use states.automation.some_automation.last_triggered

Has HA been restarted? If you restart, it wipes those values out.

Plenty of other automations have laat_triggered seems to be ones based on an event that fail to update.

Any errors in the log?

I too am having this problem. I noticed it when on another post:

All my automations reset to null on reset and automations restart.

@123 has been trying his setup and all his keep the last_triggered attribute on restart.

Only difference we can see is I am on Hassio and he is not.

Anyone have any ideas ?

So, @123 has figured this out. If you have initial_state set to true in your automation, that will cause HA to change the last_triggered attribute to null on automations reload or restart

Relevant post is here: