Skip to content

Commit

Permalink
Fix blocking call error for homeassistant
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanruthe committed Jan 5, 2025
1 parent 68db369 commit c3abea8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions aiophyn/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ async def connect(self):
self.client.ws_set_options(path, headers={'Host': self.host})

if self.verify_ssl:
self.client.tls_set()
context = ssl.SSLContext()
self.client.tls_set_context(context)
else:
context = ssl.SSLContext()
context.verify_mode = ssl.CERT_NONE
Expand Down Expand Up @@ -326,7 +327,7 @@ def _on_message(
) -> None:
# pylint: disable=unused-argument
msg = message.payload.decode()
_LOGGER.debug("Message received on %s", message.topic)
_LOGGER.debug("Message received on %s: %s", message.topic, msg)
try:
data = json.loads(msg)
except json.decoder.JSONDecodeError:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "aiophyn"
version = "2024.1.4"
version = "2025.1.1"
description = "An asynchronous library for Phyn Smart Water devices"
authors = ["MizterB <[email protected]>","jordanruthe <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit c3abea8

Please sign in to comment.