I’m having an issue.
I need to know the last time a switch was ON. I’ve been using the last_changed template, but it is not good enough because it resets every time HA restarts, and every time the device goes unavailable and the switch controls my plants watering. (Sometimes a few days pass between each watering).
Quite pleased I didn’t need to look up the Spanish day names, despite it being about 381 years since my last Spanish lesson… (edit: missed a couple of diacriticals )
@tom_l suggested that the sensor should keep its value over a restart.
I’ve not used one of these new trigger-based sensors yet, but if it does not work you could use an input_datetime instead [docs], created under Helpers (Ayudantes) and updated via an automation. Let me know if you need more help with that.
Here’s a solution for weekday and month names that effectively duplicates the specific timestamp_custom output in Spanish, but it should be easier than this. I’m assuming your abbreviations are just the first three letters of each full name. Pop this in the template editor to adjust how you want, and swap in your timestamp in place of now() as required: