Automation last_triggered attribute changed in 0.95?

Good idea. I wish I would have thought of that. Lol! :smile:

If it helps, restoring an automationā€™s last_triggered attribute was added in this PR by kellerza about 2 1/2 years ago. Ring any bells?

Thanks everyone for the educational discussion, especially @pnbruckner, @Mariusthvdb for their suggestions.

@123: I am struggling with the string - datetime object conversion

{% set last_triggered = "2019-06-27T23:07:11.734137+00:00" %}
{% set test = strptime(last_triggered,"") %}
{{ test is string }}

True

You can solve this, of course, however you like. I guess Iā€™m wondering, what about what I suggested above did not do what you were looking for?

Oh, I did implement your suggestion. I just used @123 's suggestion as a learning opportunity for myself. that unfortunately didnā€™t go far :wink:

Just an FYI. I submitted a PR to fix the bug that restores an automationā€™s last_triggered attribute as a string instead of a datetime. See: https://github.com/home-assistant/home-assistant/pull/24951

2 Likes