mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-25 05:47:20 +00:00
Format timestamp sensor states (#10525)
This commit is contained in:
parent
ea331dbe0b
commit
c26a59d805
@ -117,7 +117,10 @@ export const computeStateDisplay = (
|
||||
}
|
||||
|
||||
// state of button is a timestamp
|
||||
if (domain === "button") {
|
||||
if (
|
||||
domain === "button" ||
|
||||
(domain === "sensor" && stateObj.attributes.device_class === "timestamp")
|
||||
) {
|
||||
return formatDateTime(new Date(compareState), locale);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user