Skip to content

Commit

Permalink
update to paho-mqtt 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Tabisch committed Jan 25, 2025
1 parent 3ab3cf6 commit af21aa7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ roombapy = "roombapy.cli:cli"
[tool.poetry.dependencies]
python = ">=3.10,<4.0"
orjson = ">=3.9.13"
paho-mqtt = "~1.6.1"
paho-mqtt = "~2.1.0"
mashumaro = {version = "^3.12"}
click = { version = "^8.1", optional = true }
tabulate = { version = "^0.9", optional = true }
Expand Down
5 changes: 4 additions & 1 deletion roombapy/remote_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ def _open_mqtt_connection(self) -> None:
self.mqtt_client.loop_start()

def _get_mqtt_client(self) -> mqtt.Client:
mqtt_client = mqtt.Client(client_id=self.blid)
mqtt_client = mqtt.Client(
callback_api_version=mqtt.CallbackAPIVersion.VERSION1,
client_id=self.blid
)
mqtt_client.username_pw_set(username=self.blid, password=self.password)
mqtt_client.on_connect = self._internal_on_connect
mqtt_client.on_disconnect = self._internal_on_disconnect
Expand Down

0 comments on commit af21aa7

Please sign in to comment.