You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to connect multiple Home Assistant controllers to my code. The code snippet below is working and I am getting responses from two controllers. The problem is I can't determine which controller returns the response. I realize I could add different WS_OnEvent functions to separate the returns but that becomes cumbersome if there are 50 connections. Is there some method to make this determination more cleanly?
var hassWSApi = new HassWSApi();
var connectionParameters = ConnectionParameters.CreateFromInstanceBaseUrl("http://192.168.55.125:8123/", "...");
await hassWSApi.ConnectAsync(connectionParameters);
var hassWSApi2 = new HassWSApi();
connectionParameters = ConnectionParameters.CreateFromInstanceBaseUrl("http://192.168.55.165:8123/", "...");
await hassWSApi2.ConnectAsync(connectionParameters);
await hassWSApi.AddEventHandlerSubscriptionAsync(WS_OnEvent);
await hassWSApi2.AddEventHandlerSubscriptionAsync(WS_OnEvent);
The text was updated successfully, but these errors were encountered:
I am trying to connect multiple Home Assistant controllers to my code. The code snippet below is working and I am getting responses from two controllers. The problem is I can't determine which controller returns the response. I realize I could add different WS_OnEvent functions to separate the returns but that becomes cumbersome if there are 50 connections. Is there some method to make this determination more cleanly?
The text was updated successfully, but these errors were encountered: