Websocket connection from HA

Is there any way to initiate websocket connection from HA? I.e. where HA is a client (websocket api doesn’t help, since there HA is a server).

Or, is there any existing air conditioner integration with such logic? Then I would re-write it to work with my air conditioner.