Browse Source

Expand conditions for detecting an error at startup.

Jason Rumney 7 months ago
parent
commit
6ab3a5096d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      custom_components/tuya_local/entity.py

+ 1 - 1
custom_components/tuya_local/entity.py

@@ -115,7 +115,7 @@ class TuyaLocalEntity:
         await self._device.async_refresh()
 
     async def async_added_to_hass(self):
-        if not self.enabled:
+        if not self.enabled or self.registry_entry is None:
             raise HomeAssistantError("HA bug #152729")
         self._device.register_entity(self)
         if self._config.deprecated: