UNPKG

@hakit/core

Version:

A collection of React hooks and helpers for Home Assistant to easily communicate with the Home Assistant WebSocket API.

100 lines (99 loc) 2.56 kB
const o = (e) => { const r = e.state !== "closed"; switch (e.attributes.device_class) { case "garage": switch (e.state) { case "opening": return "mdi:arrow-up-box"; case "closing": return "mdi:arrow-down-box"; case "closed": return "mdi:garage"; default: return "mdi:garage-open"; } case "gate": switch (e.state) { case "opening": case "closing": return "mdi:gate-arrow-right"; case "closed": return "mdi:gate"; default: return "mdi:gate-open"; } case "door": return r ? "mdi:door-open" : "mdi:door-closed"; case "damper": return r ? "mdi:circle" : "mdi:circle-slice-8"; case "shutter": switch (e.state) { case "opening": return "mdi:arrow-up-box"; case "closing": return "mdi:arrow-down-box"; case "closed": return "mdi:window-shutter"; default: return "mdi:window-shutter-open"; } case "curtain": switch (e.state) { case "opening": return "mdi:arrow-split-vertical"; case "closing": return "mdi:arrow-collapse-horizontal"; case "closed": return "mdi:curtains-closed"; default: return "mdi:curtains"; } case "blind": switch (e.state) { case "opening": return "mdi:arrow-up-box"; case "closing": return "mdi:arrow-down-box"; case "closed": return "mdi:blinds-horizontal-closed"; default: return "mdi:blinds-horizontal"; } case "shade": switch (e.state) { case "opening": return "mdi:arrow-up-box"; case "closing": return "mdi:arrow-down-box"; case "closed": return "mdi:roller-shade-closed"; default: return "mdi:roller-shade"; } case "window": switch (e.state) { case "opening": return "mdi:arrow-up-box"; case "closing": return "mdi:arrow-down-box"; case "closed": return "mdi:window-closed"; default: return "mdi:window-open"; } } switch (e.state) { case "opening": return "mdi:arrow-up-box"; case "closing": return "mdi:arrow-down-box"; case "closed": return "mdi:window-closed"; default: return "mdi:window-open"; } }; export { o as coverIcon }; //# sourceMappingURL=cover.js.map