Преглед изворни кода

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 месеци
родитељ
комит
4f62e41973
1 измењених фајлова са 1 додато и 0 уклоњено
  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"]