I have been using an automation to tell me when Home Assistant has started or stopped.
Last week the STOPPED automation would not work anymore. But the START still works fine.
Can someone see if something in the code has changed. BTW this was created in the automation editor.
- id: '1600955298691'
alias: Home Assistant is Stopping
description: Home Assistant is Stopping
trigger:
- platform: homeassistant
event: shutdown
condition: []
action:
data:
data:
photo:
caption: Home Assistant Has Stopped as of {{ now().strftime('%A, %B %d,
%Y %I:%M:%S %p') }}
url: https://REDACTED/local/images/ha/red.png
message: Home Assistant Has Stoppedas of {{ now().strftime('%A, %B %d, %Y %I:%M:%S
%p') }}
title: Home Assistant Stopped
service: notify.telegram_carlton
mode: single
I’ve never been able to get the homeassistant shutdown event to do anything. I’ve watched the logs and see that the event is fired, but it’s already shut down all of the other services so the automation fires but there is no notify service to call.
I know that doesn’t really help you, especially if it was working for you before, but I think there’s a race condition between things stopping and the event being fired that’s never been resolved.
That is what I am finding also. The action fires but it probably shuts down before the message is sent out.
I do not know why it changed in the last few weeks. But it had been working flawlessly for over a year.
I tried your setup, both in the automation configurator and as a straight automation.
Neither worked.
I can see the event get fired but nothing is sent. When it boots back up I get my notice.
Will keep working on it.
Wish I could create a delay of 5 seconds once the restart command is fired.
Thank you for the help.
When I go to restart I always do a check config and then hit the restart button.
Once a week I do an update of the NUC and then I do a full device reboot.
Could be my way of installing and such has changed that does not affect others.
It is not a big deal, I still get notified when it restarts which is good enough for now.
Thanks for the help.