mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +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";
|
||||
}
|
||||
break;
|
||||
|
||||
case "sun":
|
||||
return stateObj?.state === "above_horizon"
|
||||
? FIXED_DOMAIN_ICONS[domain]
|
||||
: "hass:weather-night";
|
||||
}
|
||||
|
||||
if (domain in FIXED_DOMAIN_ICONS) {
|
||||
|
@ -154,11 +154,8 @@ export class HaStateLabelBadge extends LitElement {
|
||||
case "device_tracker":
|
||||
case "updater":
|
||||
case "person":
|
||||
return stateIcon(state);
|
||||
case "sun":
|
||||
return state.state === "above_horizon"
|
||||
? domainIcon(domain)
|
||||
: "hass:brightness-3";
|
||||
return stateIcon(state);
|
||||
case "timer":
|
||||
return state.state === "active"
|
||||
? "hass:timer-outline"
|
||||
|
Loading…
x
Reference in New Issue
Block a user