1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00
Files
frontend/js/common/component/condition/zone.js
Paulus Schoutsen 28457747e7 Fix eslint import extension (#682)
* Fix eslint import extension

* Update eslint hound

* Enable no unresolved for normal usage
2017-11-25 11:14:44 -08:00

38 lines
758 B
JavaScript

import { h, Component } from 'preact';
import { onChangeEvent } from '../../util/event.js';
export default class ZoneCondition extends Component {
constructor() {
super();
this.onChange = onChangeEvent.bind(this, 'condition');
}
/* eslint-disable camelcase */
render({ condition }) {
const { entity_id, zone } = condition;
return (
<div>
<paper-input
label="Entity Id"
name="entity_id"
value={entity_id}
onChange={this.onChange}
/>
<paper-input
label="Zone entity id"
name="zone"
value={zone}
onChange={this.onChange}
/>
</div>
);
}
}
ZoneCondition.defaultConfig = {
entity_id: '',
zone: '',
};