mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +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) {
|
switch (state.attributes.device_class) {
|
||||||
case "garage":
|
case "garage":
|
||||||
return open ? "hass:garage-open" : "hass: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:
|
default:
|
||||||
return domainIcon("cover", state.state);
|
return domainIcon("cover", state.state);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user