mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-29 20:26:39 +00:00
Lovelace alarm panel respects the code_format attribute on the alarm entity (#2379)
This commit is contained in:
parent
38a2627227
commit
adf0c6d891
@ -138,32 +138,46 @@ class HuiAlarmPanelCard extends hassLocalizeLitMixin(LitElement)
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<paper-input
|
${
|
||||||
label="Alarm Code"
|
!stateObj.attributes.code_format
|
||||||
type="password"
|
? html``
|
||||||
.value="${this._code}"
|
: html`
|
||||||
></paper-input>
|
<paper-input
|
||||||
<div id="keypad">
|
label="Alarm Code"
|
||||||
${
|
type="password"
|
||||||
BUTTONS.map((value) => {
|
.value="${this._code}"
|
||||||
return value === ""
|
></paper-input>
|
||||||
? html`
|
`
|
||||||
<paper-button disabled></paper-button>
|
}
|
||||||
`
|
${
|
||||||
: html`
|
stateObj.attributes.code_format !== "Number"
|
||||||
<paper-button
|
? html``
|
||||||
noink
|
: html`
|
||||||
raised
|
<div id="keypad">
|
||||||
.value="${value}"
|
${
|
||||||
@click="${this._handlePadClick}"
|
BUTTONS.map((value) => {
|
||||||
>${
|
return value === ""
|
||||||
value === "clear" ? this._label("clear_code") : value
|
? html`
|
||||||
}</paper-button
|
<paper-button disabled></paper-button>
|
||||||
>
|
`
|
||||||
`;
|
: html`
|
||||||
})
|
<paper-button
|
||||||
}
|
noink
|
||||||
</div>
|
raised
|
||||||
|
.value="${value}"
|
||||||
|
@click="${this._handlePadClick}"
|
||||||
|
>${
|
||||||
|
value === "clear"
|
||||||
|
? this._label("clear_code")
|
||||||
|
: value
|
||||||
|
}</paper-button
|
||||||
|
>
|
||||||
|
`;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
}
|
||||||
</ha-card>
|
</ha-card>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user