Handle missing entity

This commit is contained in:
G Johansson
2026-07-06 12:29:51 +00:00
parent d146bce5be
commit 2b7aae8f0e
2 changed files with 5 additions and 1 deletions
+2 -1
View File
@@ -47,7 +47,8 @@ class MigrateToGroupSensorFlow(RepairsFlow):
old_entity = entity_reg.async_get_entity_id(
SENSOR_DOMAIN, DOMAIN, self.entry.entry_id
)
assert old_entity
if not old_entity:
return self.async_abort(reason="entity_not_found")
if user_input is not None:
config = dict(self.entry.options)
@@ -13,6 +13,9 @@
"issues": {
"migrate_to_group_sensor": {
"fix_flow": {
"abort": {
"entity_not_found": "Entity could not be found, please restart repairing the issue."
},
"step": {
"migrate": {
"description": "The Min/Max helper has been deprecated and {title} will be migrated to a group sensor when you click submit to fix this repair.",