mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
Make input_text entity row usable when value is "unknown" (#8258)
This commit is contained in:
parent
d4000cf662
commit
f02841409c
@ -10,7 +10,7 @@ import {
|
|||||||
PropertyValues,
|
PropertyValues,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { UNAVAILABLE_STATES } from "../../../data/entity";
|
import { UNAVAILABLE } from "../../../data/entity";
|
||||||
import { setValue } from "../../../data/input_text";
|
import { setValue } from "../../../data/input_text";
|
||||||
import { HomeAssistant } from "../../../types";
|
import { HomeAssistant } from "../../../types";
|
||||||
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
import { hasConfigOrEntityChanged } from "../common/has-changed";
|
||||||
@ -54,7 +54,7 @@ class HuiInputTextEntityRow extends LitElement implements LovelaceRow {
|
|||||||
<hui-generic-entity-row .hass=${this.hass} .config=${this._config}>
|
<hui-generic-entity-row .hass=${this.hass} .config=${this._config}>
|
||||||
<paper-input
|
<paper-input
|
||||||
no-label-float
|
no-label-float
|
||||||
.disabled=${UNAVAILABLE_STATES.includes(stateObj.state)}
|
.disabled=${stateObj.state === UNAVAILABLE}
|
||||||
.value="${stateObj.state}"
|
.value="${stateObj.state}"
|
||||||
.minlength="${stateObj.attributes.min}"
|
.minlength="${stateObj.attributes.min}"
|
||||||
.maxlength="${stateObj.attributes.max}"
|
.maxlength="${stateObj.attributes.max}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user