Bug fixes

This commit is contained in:
Paulus Schoutsen 2017-08-09 00:34:18 -07:00
parent f02d42d79c
commit a51b9c1eb5
3 changed files with 18 additions and 18 deletions

View File

@ -78,7 +78,6 @@ export default class Automation extends Component {
<Trigger trigger={trigger} onChange={this.triggerChanged} />
</ha-config-section>
{ condition &&
<ha-config-section is-wide={isWide}>
<span slot='header'>Conditions</span>
<span slot='introduction'>
@ -93,7 +92,7 @@ export default class Automation extends Component {
</a></p>
</span>
<Condition condition={condition} onChange={this.conditionChanged} />
</ha-config-section>}
</ha-config-section>
<ha-config-section is-wide={isWide}>
<span slot='header'>Action</span>

View File

@ -15,7 +15,7 @@ export default class SunCondition extends Component {
const condition = { ...this.props.condition };
if (ev.target.selected) {
condition[key] = ev.target.value;
condition[key] = ev.target.selected;
} else {
delete condition[key];
}

View File

@ -216,6 +216,7 @@ Polymer({
trigger: [
{ platform: 'state' },
],
condition: [],
action: [
{ service: '' },
],
@ -253,7 +254,7 @@ Polymer({
this.dirty = false;
if (this.creatingNew) {
history.pushState(null, null, '/automation/edit/' + id);
history.replaceState(null, null, '/config/automation/edit/' + id);
this.fire('location-changed');
}
}.bind(this), function (errors) {