Make appdeamon wait hass fully load

Hello everyone,

I’m using appdeamon for complexe automatisation as notifing me when my washing machine is finished.
BUT, i’m starting appdeamon and home assistant using docker-compose technology ( with docker ).

so when home assistant finish to start, appdeamon starts, but all compagnion app are not fully ready so when appdeamon finish to load “notify/mobile_XX” do not exist (in appdeamon contact ).

Any idea in order to fix my issue ? :slight_smile:

thanks.

Maybe this will help. I have an appdaemon app that tells me whenever Home Assistant restarts and you could try placing your startup code for your app in the event handler callback ha_restart below.

Or, just add a delay before the appdaemon container is started.

import appdaemon.plugins.hass.hassapi as hass

class NotifyRestart(hass.Hass):
    def initialize(self):
      self.listen_event(self.ha_restart, "plugin_started") 

    def ha_restart(self, event_name, data, kwargs):
      self.call_service("tts/google_say", entity_id="media_player.living_room", message= "Home Assistant has started.", language='en')
      self.log(event_name)
      self.log(data)  # data will contain a dictionary with the name of the plugin that caused the event, i.e. {'name': 'HASS'}

1 Like

Hello, i will try this :smiley:

thanks