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
@@ -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"]