217 files

This commit is contained in:
Home Assistant Version Control
2026-07-30 23:59:38 +00:00
parent d43a63ad29
commit 7b5e46e702
217 changed files with 15978 additions and 3912 deletions
+10 -5
View File
@@ -33,6 +33,7 @@ from .const import (
MANUFACTURER_WLED,
CalculationStrategy,
)
from .device_binding import is_composite_device_id
from .group_include.filter import (
CategoryFilter,
CompositeFilter,
@@ -386,7 +387,11 @@ class DiscoveryManager:
async def get_devices(self) -> list[dr.DeviceEntry]:
"""Fetch device entries."""
return list(dr.async_get(self.hass).devices.values())
return [
device
for device in dr.async_get(self.hass).devices.values()
if not is_composite_device_id(self.hass, device.id)
]
def enable(self) -> None:
"""Enable the discovery."""
@@ -483,7 +488,7 @@ class DiscoveryManager:
source_entity: SourceEntity,
log_identifier: str,
power_profiles: list[PowerProfile] | None,
extra_discovery_data: dict | None,
extra_discovery_data: dict[str, Any] | None,
) -> None:
"""Dispatch the discovery flow for a given entity."""
@@ -566,7 +571,7 @@ class DiscoveryManager:
return entities
def _find_entity_ids_in_yaml_config(self, search_dict: dict) -> list[str]:
def _find_entity_ids_in_yaml_config(self, search_dict: ConfigType) -> list[str]:
"""Takes a dict with nested lists and dicts,
and searches all dicts for a key of the field
provided.
@@ -575,7 +580,7 @@ class DiscoveryManager:
self._extract_entity_ids(search_dict, found_entity_ids)
return found_entity_ids
def _extract_entity_ids(self, search_dict: dict, found_entity_ids: list[str]) -> None:
def _extract_entity_ids(self, search_dict: ConfigType, found_entity_ids: list[str]) -> None:
"""Helper function to recursively extract entity IDs."""
for key, value in search_dict.items():
if key == CONF_ENTITY_ID:
@@ -585,7 +590,7 @@ class DiscoveryManager:
elif isinstance(value, list):
self._process_list_items(value, found_entity_ids)
def _process_list_items(self, items: list, found_entity_ids: list[str]) -> None:
def _process_list_items(self, items: list[Any], found_entity_ids: list[str]) -> None:
"""Helper function to process list items."""
for item in items:
if isinstance(item, dict):