Skip to content

Commit

Permalink
fix: use new max_ws_message_size, remove from RESTConnector
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejgray committed Feb 7, 2025
1 parent 8de77ce commit e8c6e9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion ovos_PHAL_plugin_homeassistant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ def init_configuration(self, message=None):
configuration_host,
configuration_api_key,
configuration_assist_only,
self.max_ws_message_size
)
self.devices = self.connector.get_all_devices()
self.registered_devices = []
Expand Down
4 changes: 2 additions & 2 deletions ovos_PHAL_plugin_homeassistant/logic/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,11 @@ def send_assist_command(self, command, arguments={}):


class HomeAssistantWSConnector(HomeAssistantConnector):
def __init__(self, host, api_key, assist_only=True):
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._connection = HomeAssistantClient(self.host, self.api_key)
self._connection = HomeAssistantClient(url=self.host, token=self.api_key, max_ws_message_size=max_ws_message_size)
self._connection.connect()

# Initialize client instance
Expand Down

0 comments on commit e8c6e9f

Please sign in to comment.