Closed nagyrobi closed 1 year ago
This will not always work...
This is about integration dependencies not domain dependencies. This will only work for entities still under the domain integration (which are fewer on each release as we move them into their own integrations).
Most critical ones are climate
, media_player
and weather
. These are big things and can take long till they load.
those are domains.... example: sonos media_player can start afterwards with that configuration... also: you can't (at this moment) list ALL integrations in after_dependencies
I see. HA needs a way to set a kind priority when loading integrations
Isn't there an event you can subscribe to that indicates when ALL domains and integrations are loaded and HA is ready. Maybe the processing of the templates needs to be deferred until HA is that ready state...
what is ready :) ?
At that point in time openHASP is not ready yet ... meaning such event can't be sent... this is a tricky race condition, all integrations can wait for everyone, hence no one loads...
and btw... this only influences python imports... not actual entity availability
I would create a special template sensor containing all my entities which can affect negatively openHASP when they are unavailable. When that shows green, let openHASP go...
sure you want to block everything in case 1 entity is unavailable ?
Well it would be better indeed if we could make the templates more robust. Unfortunately the entire template is evaluated, despite I put an if condition around it to check for the inner entity availability...
after_dependencies
postpones the loading of the custom component until loading of the integrations specified here finishes first. This is needed in order to avoid template errors generated by openHASP config at startup, due to entities being still unavailable. openHASP should load among the last ones.