mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
Add relevant device_class icons for Cover entity (#3482)
* Add relevant cover icons for supported device classes * Remove icon which doesn't have closed/open state * Remove umbrella icon for awnings
This commit is contained in:
parent
204bd803bf
commit
9fa8544972
@ -7,6 +7,10 @@ export default function coverIcon(state: HassEntity): string {
|
||||
switch (state.attributes.device_class) {
|
||||
case "garage":
|
||||
return open ? "hass:garage-open" : "hass:garage";
|
||||
case "door":
|
||||
return open ? "hass:door-open" : "hass:door-closed";
|
||||
case "window":
|
||||
return open ? "hass:window-open" : "hass:window-closed";
|
||||
default:
|
||||
return domainIcon("cover", state.state);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user