This behavior is not working as expected for me - I’m on the Beta 3, so not sure if this is something new with the Beta or has always been like this.
Referring to this section in the documentation:
Using AppDaemon, it is possible to subscribe to specific events as well as fire off events.
In addition to the Home Assistant supplied events, AppDaemon adds 2 more events. These are internal to AppDaemon
and are not visible on the Home Assistant bus:
• appd_started - fired once when AppDaemon is first started and after Apps are initialized
• ha_started - fired every time AppDaemon detects a Home Assistant restart
• ha_disconnectd - fired once every time AppDaemon loses its connection with HASS
First off there are two typos:
-
AppDaemon adds 3 more events (not 2)
-
ha_disconnectd - should be ha_disconnected
Here’s my question - when I do a restart of the home assistant service, I only see a bunch (not one) ha_disconnected events fire (the INFOs are my own debugging):
2018-02-23 10:37:35.709816 WARNING AppDaemon: HASS: Disconnected from Home Assistant, retrying in 5 seconds
2018-02-23 10:37:35.712519 INFO debug: DEBUG ListenEvent Start: ---------
2018-02-23 10:37:35.717309 INFO debug: ha_disconnected
2018-02-23 10:37:40.718411 WARNING AppDaemon: HASS: Disconnected from Home Assistant, retrying in 5 seconds
2018-02-23 10:37:40.720935 INFO debug: DEBUG ListenEvent Start: ---------
2018-02-23 10:37:40.723019 INFO debug: ha_disconnected
2018-02-23 10:37:45.722674 WARNING AppDaemon: HASS: Disconnected from Home Assistant, retrying in 5 seconds
2018-02-23 10:37:45.725347 INFO debug: DEBUG ListenEvent Start: ---------
2018-02-23 10:37:45.727891 INFO debug: ha_disconnected
Also, shouldn’t I see a ha_started event?
Hope this all makes sense - thanks again for all the work that you do on this and such a fantastic piece of work!
Tom