Skip to content

Commit

Permalink
use variable for websocket url instead of string
Browse files Browse the repository at this point in the history
  • Loading branch information
Kleinrotti committed Jun 13, 2022
1 parent ea2a422 commit fef0b44
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/senertec/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class basesocketclient:
def __init__(self, level=logging.WARN):
self.logger = logging.getLogger(__name__)
self.logger.setLevel(level)
self.WS_HOST = "wss://dachsconnect.senertec.com/ws"
self.__is_ws_connected__ = False
self.__messages__ = [str()]
self.__thread__ = None
Expand Down Expand Up @@ -87,7 +88,7 @@ def __create_websocket__(self):
cookies = self.__getCookies__(
self.__session__.cookies, "dachsconnect.senertec.com")
self.logger.debug("Creating websocket connection..")
self.ws = websocket.WebSocketApp("wss://dachsconnect.senertec.com/ws",
self.ws = websocket.WebSocketApp(self.WS_HOST,
on_message=self.__on_message__,
on_error=self.__on_error__,
on_close=self.__on_close__,
Expand Down

0 comments on commit fef0b44

Please sign in to comment.