Good idea. I wish I would have thought of that. Lol!
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
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