Просмотр исходного кода

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 часов назад
Родитель
Сommit
172f606a90
1 измененных файлов с 1 добавлено и 1 удалено
  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,
         )