mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-12 14:54:04 +02:00
Merge pull request #351 from danaues/show_missing_error
Add missing light error logging and display error to user
This commit is contained in:
commit
ea525def98
14 changed files with 32 additions and 13 deletions
|
|
@ -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))}
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@
|
|||
}
|
||||
},
|
||||
"error": {
|
||||
"option_error": "Ugyldig indstilling"
|
||||
"option_error": "Ugyldig indstilling",
|
||||
"entity_missing": "Et udvalgt lys blev ikke fundet "
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@
|
|||
}
|
||||
},
|
||||
"error": {
|
||||
"option_error": "Fehlerhafte Option"
|
||||
"option_error": "Fehlerhafte Option",
|
||||
"entity_missing": "Ein ausgewähltes Licht wurde nicht gefunden"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@
|
|||
}
|
||||
},
|
||||
"error": {
|
||||
"option_error": "Vigane suvand"
|
||||
"option_error": "Vigane suvand",
|
||||
"entity_missing": "Valitud valgust ei leitud"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@
|
|||
}
|
||||
},
|
||||
"error": {
|
||||
"option_error": "Option non valide"
|
||||
"option_error": "Option non valide",
|
||||
"entity_missing": "Une lumière sélectionnée n’a pas été trouvée"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@
|
|||
}
|
||||
},
|
||||
"error": {
|
||||
"option_error": "Opzione non valida"
|
||||
"option_error": "Opzione non valida",
|
||||
"entity_missing": "Non è stata trovata una luce selezionata"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@
|
|||
}
|
||||
},
|
||||
"error": {
|
||||
"option_error": "Błędne opcje"
|
||||
"option_error": "Błędne opcje",
|
||||
"entity_missing": "Nie znaleziono wybranego światła"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@
|
|||
}
|
||||
},
|
||||
"error": {
|
||||
"option_error": "Ошибка в настройках!"
|
||||
"option_error": "Ошибка в настройках!",
|
||||
"entity_missing": "Выбранный индикатор не найден"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,8 @@
|
|||
}
|
||||
},
|
||||
"error": {
|
||||
"option_error": "Ogiltlig inställning"
|
||||
"option_error": "Ogiltlig inställning",
|
||||
"entity_missing": "Ett valt ljus hittades inte"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@
|
|||
}
|
||||
},
|
||||
"error": {
|
||||
"option_error": "Хибна опція"
|
||||
"option_error": "Хибна опція",
|
||||
"entity_missing": "Вибраного світла в домашньому помічнику не знайшли"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue