mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
Proper fix to alarm-control-panel-card (#2741)
This commit is contained in:
parent
0f779dd7f8
commit
38ba6058be
@ -63,11 +63,9 @@ class HuiAlarmPanelCard extends LitElement implements LovelaceCard {
|
|||||||
|
|
||||||
const stateObj = this.hass.states[this._config.entity];
|
const stateObj = this.hass.states[this._config.entity];
|
||||||
|
|
||||||
if (!stateObj) {
|
return !stateObj || stateObj.attributes.code_format !== FORMAT_NUMBER
|
||||||
return 0;
|
? 3
|
||||||
}
|
: 8;
|
||||||
|
|
||||||
return stateObj.attributes.code_format !== FORMAT_NUMBER ? 3 : 8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public setConfig(config: Config): void {
|
public setConfig(config: Config): void {
|
||||||
|
@ -57,7 +57,7 @@ export class HuiAlarmPanelCardEditor extends LitElement
|
|||||||
return html``;
|
return html``;
|
||||||
}
|
}
|
||||||
|
|
||||||
const states = ["arm_home", "arm_away", "arm_night", "armed_custom_bypass"];
|
const states = ["arm_home", "arm_away", "arm_night", "arm_custom_bypass"];
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
${configElementStyle} ${this.renderStyle()}
|
${configElementStyle} ${this.renderStyle()}
|
||||||
|
@ -346,7 +346,7 @@
|
|||||||
"arm_home": "Arm home",
|
"arm_home": "Arm home",
|
||||||
"arm_away": "Arm away",
|
"arm_away": "Arm away",
|
||||||
"arm_night": "Arm night",
|
"arm_night": "Arm night",
|
||||||
"armed_custom_bypass": "Custom bypass"
|
"arm_custom_bypass": "Custom bypass"
|
||||||
},
|
},
|
||||||
"automation": {
|
"automation": {
|
||||||
"last_triggered": "Last triggered",
|
"last_triggered": "Last triggered",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user