208 files

This commit is contained in:
Home Assistant Version Control
2026-10-07 02:49:21 +00:00
parent a7107ecbe1
commit cfd0d40c8e
208 changed files with 5434 additions and 901 deletions
@@ -1,30 +0,0 @@
"""Spook - Your homie."""
from __future__ import annotations
from typing import TYPE_CHECKING
from homeassistant.const import EVENT_COMPONENT_LOADED
from homeassistant.helpers import entity_registry as er
from ....repairs import AbstractSpookEntityPlatformUnknownSourceRepair
if TYPE_CHECKING:
from typing import Any
class SpookRepair(AbstractSpookEntityPlatformUnknownSourceRepair):
"""Spook repair tries to find unknown source entities for switch_as_x."""
domain = "switch_as_x"
repair = "switch_as_x_unknown_source"
inspect_events = {
EVENT_COMPONENT_LOADED,
er.EVENT_ENTITY_REGISTRY_UPDATED,
}
inspect_config_entry_changed = "switch_as_x"
def _get_source_entity_id(self, entity: Any) -> str:
"""Return the wrapped switch's entity ID."""
# pylint: disable-next=protected-access
return entity._switch_entity_id # noqa: SLF001