mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix logbook for binary sensor (missing device class) (#17034)
This commit is contained in:
parent
3803bdc8da
commit
68fb98454f
@ -360,14 +360,14 @@ export const localizeStateMessage = (
|
|||||||
if (isOn) {
|
if (isOn) {
|
||||||
return localize(`${LOGBOOK_LOCALIZE_PATH}.detected_device_class`, {
|
return localize(`${LOGBOOK_LOCALIZE_PATH}.detected_device_class`, {
|
||||||
device_class: localize(
|
device_class: localize(
|
||||||
`component.binary_sensor.device_class.${device_class}`
|
`component.binary_sensor.entity_component.${device_class}.name`
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (isOff) {
|
if (isOff) {
|
||||||
return localize(`${LOGBOOK_LOCALIZE_PATH}.cleared_device_class`, {
|
return localize(`${LOGBOOK_LOCALIZE_PATH}.cleared_device_class`, {
|
||||||
device_class: localize(
|
device_class: localize(
|
||||||
`component.binary_sensor.device_class.${device_class}`
|
`component.binary_sensor.entity_component.${device_class}.name`
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user