Fix WLED exception on close (#57752)

This commit is contained in:
Paulus Schoutsen 2021-10-15 00:04:43 -07:00 committed by GitHub
parent 49b07224bf
commit 8dbff0b4b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,6 +92,7 @@ class WLEDDataUpdateCoordinator(DataUpdateCoordinator[WLEDDevice]):
async def close_websocket(_) -> None:
"""Close WebSocket connection."""
self.unsub = None
await self.wled.disconnect()
# Clean disconnect WebSocket on Home Assistant shutdown