Merge pull request #351 from danaues/show_missing_error

Add missing light error logging and display error to user
This commit is contained in:
Bas Nijholt 2022-10-29 19:39:24 -07:00 committed by GitHub
commit ea525def98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 32 additions and 13 deletions

View file

@ -98,6 +98,12 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
]
for configured_light in data[CONF_LIGHTS]:
if configured_light not in all_lights:
errors = {CONF_LIGHTS: "entity_missing"}
_LOGGER.error(
"%s: light entity %s is configured, but was not found",
data[CONF_NAME],
configured_light,
)
all_lights.append(configured_light)
to_replace = {CONF_LIGHTS: cv.multi_select(sorted(all_lights))}

View file

@ -46,7 +46,8 @@
}
},
"error": {
"option_error": "Invalid option"
"option_error": "Invalid option",
"entity_missing": "One or more selected light entities are missing from Home Assistant"
}
}
}

View file

@ -43,7 +43,8 @@
}
},
"error": {
"option_error": "Ugyldig indstilling"
"option_error": "Ugyldig indstilling",
"entity_missing": "Et udvalgt lys blev ikke fundet "
}
}
}

View file

@ -43,7 +43,8 @@
}
},
"error": {
"option_error": "Fehlerhafte Option"
"option_error": "Fehlerhafte Option",
"entity_missing": "Ein ausgewähltes Licht wurde nicht gefunden"
}
}
}

View file

@ -47,7 +47,8 @@
}
},
"error": {
"option_error": "Invalid option"
"option_error": "Invalid option",
"entity_missing": "One or more selected light entities are missing from Home Assistant"
}
}
}

View file

@ -43,7 +43,8 @@
}
},
"error": {
"option_error": "Vigane suvand"
"option_error": "Vigane suvand",
"entity_missing": "Valitud valgust ei leitud"
}
}
}

View file

@ -44,7 +44,8 @@
}
},
"error": {
"option_error": "Option non valide"
"option_error": "Option non valide",
"entity_missing": "Une lumière sélectionnée na pas été trouvée"
}
}
}

View file

@ -45,7 +45,8 @@
}
},
"error": {
"option_error": "Opzione non valida"
"option_error": "Opzione non valida",
"entity_missing": "Non è stata trovata una luce selezionata"
}
}
}

View file

@ -43,7 +43,8 @@
}
},
"error":{
"option_error":"En eller flere valgte innstillinger er ugyldige"
"option_error":"En eller flere valgte innstillinger er ugyldige",
"entity_missing": "Et utvalgt lys ble ikke funnet"
}
}
}

View file

@ -44,7 +44,8 @@
}
},
"error": {
"option_error": "Błędne opcje"
"option_error": "Błędne opcje",
"entity_missing": "Nie znaleziono wybranego światła"
}
}
}

View file

@ -44,7 +44,8 @@
}
},
"error": {
"option_error": "Opção inválida"
"option_error": "Opção inválida",
"entity_missing": "Uma luz selecionada não foi encontrada"
}
}
}

View file

@ -45,7 +45,8 @@
}
},
"error": {
"option_error": "Ошибка в настройках!"
"option_error": "Ошибка в настройках!",
"entity_missing": "Выбранный индикатор не найден"
}
}
}

View file

@ -46,7 +46,8 @@
}
},
"error": {
"option_error": "Ogiltlig inställning"
"option_error": "Ogiltlig inställning",
"entity_missing": "Ett valt ljus hittades inte"
}
}
}

View file

@ -43,7 +43,8 @@
}
},
"error": {
"option_error": "Хибна опція"
"option_error": "Хибна опція",
"entity_missing": "Вибраного світла в домашньому помічнику не знайшли"
}
}
}