1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

Fix logbook for binary sensor (missing device class) (#17034)

This commit is contained in:
Philip Allgaier
2023-06-26 12:50:51 +02:00
committed by GitHub
parent 3803bdc8da
commit 68fb98454f

View File

@@ -360,14 +360,14 @@ export const localizeStateMessage = (
if (isOn) {
return localize(`${LOGBOOK_LOCALIZE_PATH}.detected_device_class`, {
device_class: localize(
`component.binary_sensor.device_class.${device_class}`
`component.binary_sensor.entity_component.${device_class}.name`
),
});
}
if (isOff) {
return localize(`${LOGBOOK_LOCALIZE_PATH}.cleared_device_class`, {
device_class: localize(
`component.binary_sensor.device_class.${device_class}`
`component.binary_sensor.entity_component.${device_class}.name`
),
});
}