#Anyone with a way to record power outages?
1 messages · Page 1 of 1 (latest)
is it just to let you know to check some things after an outage? you could send a notification when HA starts up. that way if you get a start up notification randomly you know to check to see what happened?
or are you looking for specific information to be reported in a a specific way
i would like a from-to notification for now.
I restart Ha some times a week for updates or test, but this morning i had 3 outages while i was at home.
you could disable the automation that sends the boot up notification whilt your updating/working on the system.
or you could enable the uptime sensor on the shelly EM and use that as a condition
e.g.: on ha boot if EM uptime <10 minutes send notificaion "there was a power outage and things are back online"
Talk to a friend that you trust. Have them check if you're there and if you're not, something notify s your phone.
If they are running HA, you could even run a scheduked webhook to them, and if that times out, they can sens a notification.
Depending on where you are, you can just check with the grid provider eg powercuts.nationalgrid.com
If you have a spare bulb, set "light on" when power is back. Never turn it on.
If it's on => you had a power outage! 😉
nope, that will report internet outages as power outages
i'm in Italy. nothing like that exists here
Already thought about uptime, but i won't know when it started or how long it lasted.
you could use the uptime kuma addon and integration. i think you can automate off of that but i am not totally sure
Honestly, you're really going to struggle with this
I don't think HA runs shutdown automations when the power is cut
So what you could do is have an automation that runs every minute or so that says "I was running at this time" - either set an input datetime value, or maybe be able to get away with last run time and the automation doesn't actually do anything.
When home assistant turns off properly set an input boolean to indicate "shutdown not powercut"
When ha starts, check if that boolean is off (I.e power cut) and if so, your 1 minute automation will give you the start time of the power cut with a minute for the notification. Also set that boolean back to off
I have a similar usecase to detect if home assistant crashed.
For that I've created an input boolean "clean shutdown" that I set to on in a shutdown automation. On HA startup I do two things:
- check if the boolean is on or off if it's off I send a message
- explicitly set it to off
That way I can detect whether HA was shut down properly or not
It's the ages old logic problem. It's impossible to prove a negative. why do you care anyway?