Browse Source

fix(diagnostics): get the entity_registry instance inline

Previously was fetched into a local (accidentally deleted along with
device_registry code) and used in exactly one location.
We can just call it inline instead and save a temporary variable.
Jason Rumney 5 hours ago
parent
commit
172f606a90
1 changed files with 1 additions and 1 deletions
  1. 1 1
      custom_components/tuya_local/diagnostics.py

+ 1 - 1
custom_components/tuya_local/diagnostics.py

@@ -163,7 +163,7 @@ def _async_device_as_dict(
         }
 
         hass_entities = er.async_entries_for_device(
-            entity_registry,
+            er.async_get(hass),
             device_id=device_entry.id,
             include_disabled_entities=True,
         )