mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 18:56:39 +00:00
Display zone name in state badge (#14974)
This commit is contained in:
parent
f31a7c3af0
commit
9836912efa
@ -223,6 +223,10 @@ export class HaStateLabelBadge extends LitElement {
|
|||||||
if (domainStateKey) {
|
if (domainStateKey) {
|
||||||
return this.hass!.localize(`state_badge.${domainStateKey}`);
|
return this.hass!.localize(`state_badge.${domainStateKey}`);
|
||||||
}
|
}
|
||||||
|
// Person and device tracker state can be zone name
|
||||||
|
if (domain === "person" || domain === "device_tracker") {
|
||||||
|
return entityState.state;
|
||||||
|
}
|
||||||
if (domain === "timer") {
|
if (domain === "timer") {
|
||||||
return secondsToDuration(_timerTimeRemaining);
|
return secondsToDuration(_timerTimeRemaining);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user