mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +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
|
||||
);
|
||||
|
||||
if (domain === "cover" && stateObj.state === "open") {
|
||||
if (
|
||||
domain === "cover" &&
|
||||
["open", "opening", "closing"].includes(stateObj.state)
|
||||
) {
|
||||
const position = (stateObj as CoverEntity).attributes.current_position;
|
||||
if (position && position !== 100) {
|
||||
return `${stateDisplay} - ${Math.round(position)}${blankBeforePercent(
|
||||
|
Loading…
x
Reference in New Issue
Block a user