Ensures inputmode is set properly for alarm code inputs (#12953)

This commit is contained in:
Josh McCarty 2022-06-16 07:58:29 -07:00 committed by GitHub
parent 5160a1f55c
commit a4cb270f09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ export class MoreInfoAlarmControlPanel extends LitElement {
id="alarmCode"
.label=${this.hass.localize("ui.card.alarm_control_panel.code")}
type="password"
.inputmode=${this.stateObj.attributes.code_format ===
.inputMode=${this.stateObj.attributes.code_format ===
FORMAT_NUMBER
? "numeric"
: "text"}

View File

@ -186,7 +186,7 @@ class HuiAlarmPanelCard extends LitElement implements LovelaceCard {
id="alarmCode"
.label=${this.hass.localize("ui.card.alarm_control_panel.code")}
type="password"
.inputmode=${stateObj.attributes.code_format === FORMAT_NUMBER
.inputMode=${stateObj.attributes.code_format === FORMAT_NUMBER
? "numeric"
: "text"}
></ha-textfield>