1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 10:48:44 +00:00

Entity dropdown improvement (#674)

* Ignore hass changes while dropdown is open

* Upgrade vaadin-combo-box

* Fix styling on dev-service panel

* Fix styling for ha-entity-dropdown

* Fix height vaadin-combo-box dropdown

* Rename ha-entity-dropdown to ha-entity-picker

* More entity improvement (#675)

* Update script and automation editor to use entity picker

* Add entity and service picker to service dev panel

* Lint
This commit is contained in:
Paulus Schoutsen
2017-11-25 16:00:43 -08:00
committed by GitHub
parent 28457747e7
commit 0707528bd7
28 changed files with 730 additions and 304 deletions

View File

@@ -7,20 +7,29 @@ export default class NumericStateTrigger extends Component {
super();
this.onChange = onChangeEvent.bind(this, 'trigger');
this.entityPicked = this.entityPicked.bind(this);
}
entityPicked(ev) {
this.props.onChange(this.props.index, {
...this.props.trigger,
entity_id: ev.target.value,
});
}
/* eslint-disable camelcase */
render({ trigger }) {
render({ trigger, hass }) {
const {
value_template, entity_id, below, above
} = trigger;
return (
<div>
<paper-input
label="Entity Id"
name="entity_id"
<ha-entity-picker
value={entity_id}
onChange={this.onChange}
onChange={this.entityPicked}
hass={hass}
allowCustomEntity
/>
<paper-input
label="Above"