Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repairs: Ignore invalid entity IDs in all cases #176

Merged
merged 1 commit into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
ENTITY_MATCH_NONE,
EVENT_COMPONENT_LOADED,
)
from homeassistant.core import valid_entity_id
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_component import DATA_INSTANCES, EntityComponent
Expand Down Expand Up @@ -106,6 +107,7 @@ async def async_inspect(self) -> None:
),
)
and entity_id not in entity_ids
and valid_entity_id(entity_id)
)
}:
self.async_create_issue(
Expand Down
2 changes: 2 additions & 0 deletions custom_components/spook/repairs/group_unknown_members.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
ENTITY_MATCH_NONE,
EVENT_COMPONENT_LOADED,
)
from homeassistant.core import valid_entity_id
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.entity_platform import DATA_ENTITY_PLATFORM, EntityPlatform

Expand Down Expand Up @@ -83,6 +84,7 @@ async def async_inspect(self) -> None:
("device_tracker.", "group.", "scene."),
)
and entity_id not in entity_ids
and valid_entity_id(entity_id)
)
}:
self.async_create_issue(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
ENTITY_MATCH_NONE,
EVENT_COMPONENT_LOADED,
)
from homeassistant.core import callback
from homeassistant.core import callback, valid_entity_id
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.dispatcher import async_dispatcher_connect

Expand Down Expand Up @@ -117,6 +117,7 @@ async def async_inspect(self) -> None:
),
)
and entity_id not in entity_ids
and valid_entity_id(entity_id)
)
}:
title = "Overview"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
ENTITY_MATCH_NONE,
EVENT_COMPONENT_LOADED,
)
from homeassistant.core import valid_entity_id
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_component import DATA_INSTANCES, EntityComponent
Expand Down Expand Up @@ -107,6 +108,7 @@ async def async_inspect(self) -> None:
),
)
and entity_id not in entity_ids
and valid_entity_id(entity_id)
)
}:
self.async_create_issue(
Expand Down