Skip to content

Commit

Permalink
apply suggestion from coderabbit
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejgray committed Feb 8, 2025
1 parent e8c6e9f commit 98b77a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ovos_PHAL_plugin_homeassistant/logic/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,9 @@ class HomeAssistantWSConnector(HomeAssistantConnector):
def __init__(self, host, api_key, assist_only=True, max_ws_message_size=5242880):
super().__init__(host, api_key, assist_only)
if self.host.startswith("http"):
self.host.replace("http", "ws", 1)
self.host = self.host.replace("http", "ws", 1)
if self.host.startswith("https"):
self.host = self.host.replace("https", "wss", 1)
self._connection = HomeAssistantClient(url=self.host, token=self.api_key, max_ws_message_size=max_ws_message_size)
self._connection.connect()

Expand Down

0 comments on commit 98b77a8

Please sign in to comment.