Kaynağa Gözat

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
Jason Rumney 3 ay önce
ebeveyn
işleme
85f0cd7dc0
1 değiştirilmiş dosya ile 1 ekleme ve 0 silme
  1. 1 0
      custom_components/tuya_local/device.py

+ 1 - 0
custom_components/tuya_local/device.py

@@ -762,3 +762,4 @@ async def async_delete_device(hass: HomeAssistant, config: dict):
     await hass.data[DOMAIN][device_id]["device"].async_stop()
     del hass.data[DOMAIN][device_id]["device"]
     del hass.data[DOMAIN][device_id]["tuyadevice"]
+    del hass.data[DOMAIN][device_id]["tuyadevicelock"]