diff --git a/custom_components/spook/ectoplasms/group/repairs/unknown_members.py b/custom_components/spook/ectoplasms/group/repairs/unknown_members.py index c2560d7f99..f8458430ae 100644 --- a/custom_components/spook/ectoplasms/group/repairs/unknown_members.py +++ b/custom_components/spook/ectoplasms/group/repairs/unknown_members.py @@ -11,6 +11,7 @@ from ....const import LOGGER from ....entity_filtering import async_filter_known_entity_ids, async_get_all_entity_ids +from ....entity_suggestions import async_describe_unknown_entities from ....repairs import AbstractSpookRepair @@ -58,8 +59,8 @@ async def async_inspect(self) -> None: self.async_create_issue( issue_id=entity.entity_id, translation_placeholders={ - "entities": "\n".join( - f"- `{entity_id}`" for entity_id in unknown_entities + "entities": async_describe_unknown_entities( + self.hass, sorted(unknown_entities) ), "group": entity.name, "entity_id": entity.entity_id, diff --git a/custom_components/spook/ectoplasms/lovelace/repairs/unknown_entity_references.py b/custom_components/spook/ectoplasms/lovelace/repairs/unknown_entity_references.py index 27b9c741b4..a03ab3dbb6 100644 --- a/custom_components/spook/ectoplasms/lovelace/repairs/unknown_entity_references.py +++ b/custom_components/spook/ectoplasms/lovelace/repairs/unknown_entity_references.py @@ -17,6 +17,7 @@ from ....const import LOGGER from ....dashboard_extraction import extract_entities_from_dashboard_node from ....entity_filtering import async_filter_known_entity_ids, async_get_all_entity_ids +from ....entity_suggestions import async_describe_unknown_entities from ....repairs import AbstractSpookRepair if TYPE_CHECKING: @@ -105,8 +106,8 @@ async def async_inspect(self) -> None: self.async_create_issue( issue_id=url_path, translation_placeholders={ - "entities": "\n".join( - f"- `{entity_id}`" for entity_id in sorted(unknown_entities) + "entities": async_describe_unknown_entities( + self.hass, sorted(unknown_entities) ), "dashboard": title, "edit": f"/{url_path}/{first_view_path}?edit=1", diff --git a/custom_components/spook/ectoplasms/proximity/repairs/unknown_ignored_zones.py b/custom_components/spook/ectoplasms/proximity/repairs/unknown_ignored_zones.py index 4328cb6cfc..99b40b69d9 100644 --- a/custom_components/spook/ectoplasms/proximity/repairs/unknown_ignored_zones.py +++ b/custom_components/spook/ectoplasms/proximity/repairs/unknown_ignored_zones.py @@ -10,6 +10,7 @@ from ....const import LOGGER from ....entity_filtering import async_filter_known_entity_ids, async_get_all_entity_ids +from ....entity_suggestions import async_describe_unknown_entities from ....repairs import AbstractSpookRepair if TYPE_CHECKING: @@ -52,8 +53,8 @@ async def async_inspect(self) -> None: issue_id=entry_id, translation_placeholders={ "name": coordinator.name, - "zones": "\n".join( - f"- `{entity_id}`" for entity_id in unknown_entities + "zones": async_describe_unknown_entities( + self.hass, sorted(unknown_entities) ), }, ) diff --git a/custom_components/spook/ectoplasms/proximity/repairs/unknown_tracked_entities.py b/custom_components/spook/ectoplasms/proximity/repairs/unknown_tracked_entities.py index f79604345b..14625e7b40 100644 --- a/custom_components/spook/ectoplasms/proximity/repairs/unknown_tracked_entities.py +++ b/custom_components/spook/ectoplasms/proximity/repairs/unknown_tracked_entities.py @@ -10,6 +10,7 @@ from ....const import LOGGER from ....entity_filtering import async_filter_known_entity_ids, async_get_all_entity_ids +from ....entity_suggestions import async_describe_unknown_entities from ....repairs import AbstractSpookRepair if TYPE_CHECKING: @@ -52,8 +53,8 @@ async def async_inspect(self) -> None: issue_id=entry_id, translation_placeholders={ "name": coordinator.name, - "entities": "\n".join( - f"- `{entity_id}`" for entity_id in unknown_entities + "entities": async_describe_unknown_entities( + self.hass, sorted(unknown_entities) ), }, ) diff --git a/custom_components/spook/ectoplasms/scene/repairs/unknown_entity_references.py b/custom_components/spook/ectoplasms/scene/repairs/unknown_entity_references.py index 324377f537..9b8bce946a 100644 --- a/custom_components/spook/ectoplasms/scene/repairs/unknown_entity_references.py +++ b/custom_components/spook/ectoplasms/scene/repairs/unknown_entity_references.py @@ -9,6 +9,7 @@ from ....const import LOGGER from ....entity_filtering import async_filter_known_entity_ids, async_get_all_entity_ids +from ....entity_suggestions import async_describe_unknown_entities from ....repairs import AbstractSpookRepair if TYPE_CHECKING: @@ -60,8 +61,8 @@ async def async_inspect(self) -> None: self.async_create_issue( issue_id=entity.entity_id, translation_placeholders={ - "entities": "\n".join( - f"- `{entity_id}`" for entity_id in unknown_entities + "entities": async_describe_unknown_entities( + self.hass, sorted(unknown_entities) ), "scene": entity.name, "entity_id": entity.entity_id, diff --git a/custom_components/spook/ectoplasms/template/repairs/unknown_entity_references.py b/custom_components/spook/ectoplasms/template/repairs/unknown_entity_references.py index bdda709a23..a57e830ba4 100644 --- a/custom_components/spook/ectoplasms/template/repairs/unknown_entity_references.py +++ b/custom_components/spook/ectoplasms/template/repairs/unknown_entity_references.py @@ -10,6 +10,7 @@ from ....const import LOGGER from ....entity_filtering import async_filter_known_entity_ids, async_get_all_entity_ids +from ....entity_suggestions import async_describe_unknown_entities from ....repairs import AbstractSpookRepair from ....template_extraction import async_extract_entities_from_config @@ -80,8 +81,8 @@ async def async_inspect(self) -> None: self.async_create_issue( issue_id=entry.entry_id, translation_placeholders={ - "entities": "\n".join( - f"- `{entity_id}`" for entity_id in sorted(unknown_entities) + "entities": async_describe_unknown_entities( + self.hass, sorted(unknown_entities) ), "helper": entry.title, },