From 003d279ff49f500fd644bccc08fc6f31ba60b6ea Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 19 May 2024 14:10:51 -1000 Subject: [PATCH 1/2] Fix missing type for mqtt websocket wrapper this was removed from #117672 so it could be cherry-picked cleanly for backport --- homeassistant/components/mqtt/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/mqtt/client.py b/homeassistant/components/mqtt/client.py index 80667f812e03d7..bd9da7fc29b817 100644 --- a/homeassistant/components/mqtt/client.py +++ b/homeassistant/components/mqtt/client.py @@ -99,7 +99,7 @@ TIMEOUT_ACK = 10 RECONNECT_INTERVAL_SECONDS = 10 -type SocketType = socket.socket | ssl.SSLSocket | Any +type SocketType = socket.socket | ssl.SSLSocket | mqtt.WebsocketWrapper type SubscribePayloadType = str | bytes # Only bytes if encoding is None From 29bafc51ecfd546a7ada86906229f7dd3984ae1b Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 19 May 2024 14:48:14 -1000 Subject: [PATCH 2/2] fix type --- homeassistant/components/mqtt/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/mqtt/client.py b/homeassistant/components/mqtt/client.py index bd9da7fc29b817..830ab5380967b3 100644 --- a/homeassistant/components/mqtt/client.py +++ b/homeassistant/components/mqtt/client.py @@ -99,7 +99,7 @@ TIMEOUT_ACK = 10 RECONNECT_INTERVAL_SECONDS = 10 -type SocketType = socket.socket | ssl.SSLSocket | mqtt.WebsocketWrapper +type SocketType = socket.socket | ssl.SSLSocket | mqtt.WebsocketWrapper | Any type SubscribePayloadType = str | bytes # Only bytes if encoding is None