Skip to content

Commit

Permalink
set WebSockets path (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Aug 26, 2024
1 parent 13d197d commit 8b6b9c3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pywis_pubsub/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ def __init__(self, broker: str, options: dict = {}) -> None:

self.conn.enable_logger(logger=LOGGER)

if self.broker_url.scheme in ['ws', 'wss']:
LOGGER.debug('Setting Websockets path: {self.broker_url.path}')
self.conn.ws_set_options(self.broker_url.path)

if None not in [self.broker_url.username, self.broker_url.password]:
LOGGER.debug('Setting credentials')
self.conn.username_pw_set(
Expand Down

0 comments on commit 8b6b9c3

Please sign in to comment.