Skip to content

Commit 85f0cd7

Browse files
committed
device (subdevice sync): clean up lock when device is deleted
Clean up the lock instead of leaving it to the garbage collector, which won't happen until HA shuts down, since there is still a reference. PR #3929
1 parent 05e39de commit 85f0cd7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

custom_components/tuya_local/device.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,3 +762,4 @@ async def async_delete_device(hass: HomeAssistant, config: dict):
762762
await hass.data[DOMAIN][device_id]["device"].async_stop()
763763
del hass.data[DOMAIN][device_id]["device"]
764764
del hass.data[DOMAIN][device_id]["tuyadevice"]
765+
del hass.data[DOMAIN][device_id]["tuyadevicelock"]

0 commit comments

Comments
 (0)