Use right constant for alarm panel (#2471)

This commit is contained in:
Paulus Schoutsen 2019-01-14 07:46:09 -08:00 committed by GitHub
parent 07f624fd1c
commit 2e6d79a60f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,8 @@
import { HomeAssistant } from "../types"; import { HomeAssistant } from "../types";
export const FORMAT_TEXT = "text";
export const FORMAT_NUMBER = "number";
export const callAlarmAction = ( export const callAlarmAction = (
hass: HomeAssistant, hass: HomeAssistant,
entity: string, entity: string,

View File

@ -10,7 +10,10 @@ import { classMap } from "lit-html/directives/class-map";
import { LovelaceCard } from "../types"; import { LovelaceCard } from "../types";
import { HomeAssistant } from "../../../types"; import { HomeAssistant } from "../../../types";
import { LovelaceCardConfig } from "../../../data/lovelace"; import { LovelaceCardConfig } from "../../../data/lovelace";
import { callAlarmAction } from "../../../data/alarm_control_panel"; import {
callAlarmAction,
FORMAT_NUMBER,
} from "../../../data/alarm_control_panel";
import { hassLocalizeLitMixin } from "../../../mixins/lit-localize-mixin"; import { hassLocalizeLitMixin } from "../../../mixins/lit-localize-mixin";
import "../../../components/ha-card"; import "../../../components/ha-card";
@ -150,7 +153,7 @@ class HuiAlarmPanelCard extends hassLocalizeLitMixin(LitElement)
` `
} }
${ ${
stateObj.attributes.code_format !== "Number" stateObj.attributes.code_format !== FORMAT_NUMBER
? html`` ? html``
: html` : html`
<div id="keypad"> <div id="keypad">