mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 18:56:39 +00:00
Display cover position in tile card when opening and closing (#15809)
This commit is contained in:
parent
bf1cabca6e
commit
7b676cbd91
@ -224,7 +224,10 @@ export class HuiTileCard extends LitElement implements LovelaceCard {
|
|||||||
this.hass!.entities
|
this.hass!.entities
|
||||||
);
|
);
|
||||||
|
|
||||||
if (domain === "cover" && stateObj.state === "open") {
|
if (
|
||||||
|
domain === "cover" &&
|
||||||
|
["open", "opening", "closing"].includes(stateObj.state)
|
||||||
|
) {
|
||||||
const position = (stateObj as CoverEntity).attributes.current_position;
|
const position = (stateObj as CoverEntity).attributes.current_position;
|
||||||
if (position && position !== 100) {
|
if (position && position !== 100) {
|
||||||
return `${stateDisplay} - ${Math.round(position)}${blankBeforePercent(
|
return `${stateDisplay} - ${Math.round(position)}${blankBeforePercent(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user