Skip to content

Commit

Permalink
Support retractable in/on ceiling screens
Browse files Browse the repository at this point in the history
  • Loading branch information
pp81381 committed Jun 20, 2021
1 parent 7745c10 commit 9fe77ca
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/common/entity/cover_icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ export const coverIcon = (state?: string, stateObj?: HassEntity): string => {
default:
return "hass:window-open";
}
case "screen":
switch (state) {
case "opening":
return "hass:arrow-down-box";
case "closing":
return "hass:arrow-up-box";
case "closed":
return "hass:projector-screen-outline";
default:
return "hass:projector-screen";
}
}

switch (state) {
Expand All @@ -85,6 +96,8 @@ export const computeOpenIcon = (stateObj: HassEntity): string => {
case "door":
case "gate":
return "hass:arrow-expand-horizontal";
case "screen":
return "hass:arrow-down";
default:
return "hass:arrow-up";
}
Expand All @@ -96,6 +109,8 @@ export const computeCloseIcon = (stateObj: HassEntity): string => {
case "door":
case "gate":
return "hass:arrow-collapse-horizontal";
case "screen":
return "hass:arrow-up";
default:
return "hass:arrow-down";
}
Expand Down
1 change: 1 addition & 0 deletions src/util/hass-attributes-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const hassAttributeUtil = {
"door",
"garage",
"gate",
"screen",
"shade",
"shutter",
"window",
Expand Down

0 comments on commit 9fe77ca

Please sign in to comment.