mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-20 02:38:53 +00:00
Use new localize format (#18574)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
@@ -194,7 +194,7 @@ export const localizeStateMessage = (
|
||||
if (state === "home") {
|
||||
return localize(`${LOGBOOK_LOCALIZE_PATH}.was_at_home`);
|
||||
}
|
||||
return localize(`${LOGBOOK_LOCALIZE_PATH}.was_at_state`, "state", state);
|
||||
return localize(`${LOGBOOK_LOCALIZE_PATH}.was_at_state`, { state });
|
||||
|
||||
case "sun":
|
||||
return state === "above_horizon"
|
||||
@@ -382,11 +382,9 @@ export const localizeStateMessage = (
|
||||
return localize(`${LOGBOOK_LOCALIZE_PATH}.became_unavailable`);
|
||||
}
|
||||
|
||||
return hass.localize(
|
||||
`${LOGBOOK_LOCALIZE_PATH}.changed_to_state`,
|
||||
"state",
|
||||
stateObj ? hass.formatEntityState(stateObj, state) : state
|
||||
);
|
||||
return hass.localize(`${LOGBOOK_LOCALIZE_PATH}.changed_to_state`, {
|
||||
state: stateObj ? hass.formatEntityState(stateObj, state) : state,
|
||||
});
|
||||
};
|
||||
|
||||
export const filterLogbookCompatibleEntities: HaEntityPickerEntityFilterFunc = (
|
||||
|
||||
Reference in New Issue
Block a user