Hi, I’d like to have a sensor that would tell me when was the last time an electricity blackout occured. I have an APC UPS integrated via NUT. When a blackout occurs, sensor.ups_status_data changes from “OL” to “OL CHARG”.
How can I make a sensor that would show the time and date (or maybe even “a month ago”) of the last blackout? I’m not a programmer and templates go a bit over my head.
Hi @Stooovie
This can be done using an date time helper input
The idea here would be to create your own entity (with the input_datetime)
Then using automation triggered by sensor.ups_status_data changing state to set your newly created entity to “now()”