🛠️ Small fixes to sensor editor (#2415)

* Small fixes to sensor editor

* any -> string | number
This commit is contained in:
Bram Kragten 2019-01-07 03:06:59 +01:00 committed by Ian Richardson
parent f4f08ab0d1
commit ad113367e6

View File

@ -56,23 +56,23 @@ export class HuiSensorCardEditor extends hassLocalizeLitMixin(LitElement)
} }
get _graph(): string { get _graph(): string {
return this._config!.graph || "line"; return this._config!.graph || "none";
} }
get _unit(): string { get _unit(): string {
return this._config!.unit || ""; return this._config!.unit || "";
} }
get _detail(): number { get _detail(): number | string {
return this._config!.number || 1; return this._config!.number || "1";
} }
get _theme(): string { get _theme(): string {
return this._config!.theme || "default"; return this._config!.theme || "default";
} }
get _hours_to_show(): number { get _hours_to_show(): number | string {
return this._config!.hours_to_show || 24; return this._config!.hours_to_show || "24";
} }
protected render(): TemplateResult { protected render(): TemplateResult {
@ -109,7 +109,7 @@ export class HuiSensorCardEditor extends hassLocalizeLitMixin(LitElement)
@value-changed="${this._valueChanged}" @value-changed="${this._valueChanged}"
></paper-input> ></paper-input>
<paper-dropdown-menu <paper-dropdown-menu
.label="Graph Type" label="Graph Type"
.configValue="${"graph"}" .configValue="${"graph"}"
@value-changed="${this._valueChanged}" @value-changed="${this._valueChanged}"
> >