I am using a Starline integration.
On HA startup, a “starline.set_scan_obd_interval” is called in some automation.
Here is a short version (w/o “wait”, time delays etc)
...
trigger:
- platform: homeassistant
event: start
...
condition:
- condition: template
value_template: >-
... test some Starline entity for "unavailable/unknown"
...
action:
.. call "starline.set_scan_obd_interval" service
The “condition” was added after I started observing a “uses an unknown service” error in Log (actually, it happened immediately after starting using Starline).
Then I added this check, but sometimes anyway observed this error - i.e. the service was still unavailable even when the monitored entity was created.
I had to change a monitored entity twice: 1st it was a corresponding “device_tracker”, next some “sensor”, now it is another entity which tends to become “unavailable” more often.
Why the Starline integration’s entities become “unavailable” = separate issue.
I wonder is there a way to define if some service is available?
Kind of “starline.set_scan_obd_interval is defined”.
Update: found my old topic:
Trigger: homeassistant start OR started? Integration seems to be not ready yet
I believed that after “event: start” all integrations are fully loaded; or they probably were attempted to load (and some integrations may fail, some may not ready yet).