-
-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Description
I have some code that connects to my local HA instance via (which actually results in an odd error when the instance is not reachable, but that's another issue):
const connection = await createConnection({
auth: createLongLivedTokenAuth(cfg.homeAssistantURL, cfg.longLivedToken),
});
Then, I register to some triggers:
connection.subscribeMessage(
(_) => {
...
},
{
type: "subscribe_trigger",
trigger: {
...button.on.trigger,
},
},
{ resubscribe: true },
),
);
This works fine until I, for whatever reason, restart my HA instance. I added some logging to the disconnected
and ready
callbacks and it appears to me, that the reconnect is working. But I do not get any further messages for my subscriptions.
So I am wondering, whether they do not get re-subscribed after the reconnect? Or that HA isn't ready to handle these subscribe_trigger
messages correctly while still starting up?
I would appreciate some ideas on this.
Metadata
Metadata
Assignees
Labels
No labels