mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 01:06:35 +00:00
Use proper night time icon consistently for sun integration (#7681)
This commit is contained in:
parent
7c492338a2
commit
90f7dba793
@ -77,6 +77,11 @@ export const domainIcon = (
|
|||||||
return "hass:calendar";
|
return "hass:calendar";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "sun":
|
||||||
|
return stateObj?.state === "above_horizon"
|
||||||
|
? FIXED_DOMAIN_ICONS[domain]
|
||||||
|
: "hass:weather-night";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (domain in FIXED_DOMAIN_ICONS) {
|
if (domain in FIXED_DOMAIN_ICONS) {
|
||||||
|
@ -154,11 +154,8 @@ export class HaStateLabelBadge extends LitElement {
|
|||||||
case "device_tracker":
|
case "device_tracker":
|
||||||
case "updater":
|
case "updater":
|
||||||
case "person":
|
case "person":
|
||||||
return stateIcon(state);
|
|
||||||
case "sun":
|
case "sun":
|
||||||
return state.state === "above_horizon"
|
return stateIcon(state);
|
||||||
? domainIcon(domain)
|
|
||||||
: "hass:brightness-3";
|
|
||||||
case "timer":
|
case "timer":
|
||||||
return state.state === "active"
|
return state.state === "active"
|
||||||
? "hass:timer-outline"
|
? "hass:timer-outline"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user