Cleanup device handles on ZHA controller shutdown (#91591)

pull/91681/head
epenet 2023-04-19 17:13:58 +02:00 committed by GitHub
parent 9bd739df82
commit 55c723753e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -733,6 +733,8 @@ class ZHAGateway:
_LOGGER.debug("Shutting down ZHA ControllerApplication")
for unsubscribe in self._unsubs:
unsubscribe()
for device in self.devices.values():
device.async_cleanup_handles()
await self.application_controller.shutdown()
def handle_message(