Skip to content

Commit

Permalink
Fix blocking call warning (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollonval authored Feb 19, 2025
1 parent a301f2a commit 0c17613
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/deltadore_tydom/tydom/tydom_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ async def async_connect(self) -> ClientWebSocketResponse:
}

# configuration needed for local mode
sslcontext = ssl.create_default_context()
#- Wrap slow blocking call flagged by HA
sslcontext = await asyncio.to_thread(ssl.create_default_context)
sslcontext.options |= 0x4 # OP_LEGACY_SERVER_CONNECT
sslcontext.check_hostname = False
sslcontext.verify_mode = ssl.CERT_NONE
Expand Down

0 comments on commit 0c17613

Please sign in to comment.