mirror of
https://github.com/home-assistant/core.git
synced 2026-10-06 06:15:47 -04:00
Handle missing entity
This commit is contained in:
@@ -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.",
|
||||
|
||||
Reference in New Issue
Block a user