sceneState.kind
This commit is contained in:
parent
12f64ffbc2
commit
7f9a42fb84
4 changed files with 9 additions and 9 deletions
|
@ -28,7 +28,7 @@ class Curtain extends Component {
|
||||||
.saveDevice({ ...this.props.device, on })
|
.saveDevice({ ...this.props.device, on })
|
||||||
.catch((err) => console.error("curtains update error", err));
|
.catch((err) => console.error("curtains update error", err));
|
||||||
}else{
|
}else{
|
||||||
this.props.updateState({ id: this.props.sceneState.id, on: on },this.props.type);
|
this.props.updateState({ id: this.props.sceneState.id, on: on },this.props.sceneState.kind);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ class Curtain extends Component {
|
||||||
.saveDevice({ ...this.props.device, intensity })
|
.saveDevice({ ...this.props.device, intensity })
|
||||||
.catch((err) => console.error("curtain update error", err));
|
.catch((err) => console.error("curtain update error", err));
|
||||||
}else{
|
}else{
|
||||||
this.props.updateState({ id: this.props.sceneState.id, intensity: intensity },this.props.type);
|
this.props.updateState({ id: this.props.sceneState.id, intensity: intensity },this.props.sceneState.kind);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ class Light extends Component {
|
||||||
.saveDevice({ ...this.props.device, on })
|
.saveDevice({ ...this.props.device, on })
|
||||||
.catch((err) => console.error("regular light update error", err));
|
.catch((err) => console.error("regular light update error", err));
|
||||||
}else{
|
}else{
|
||||||
this.props.updateState({ id: this.props.sceneState.id, on: on }, this.props.type);
|
this.props.updateState({ id: this.props.sceneState.id, on: on }, this.props.sceneState.kind);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ class Light extends Component {
|
||||||
.saveDevice({ ...this.props.device, intensity })
|
.saveDevice({ ...this.props.device, intensity })
|
||||||
.catch((err) => console.error("regular light update error", err));
|
.catch((err) => console.error("regular light update error", err));
|
||||||
}else{
|
}else{
|
||||||
this.props.updateState({ id: this.props.sceneState.id, intensity: intensity }, this.props.type);
|
this.props.updateState({ id: this.props.sceneState.id, intensity: intensity }, this.props.sceneState.kind);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ class SmartPlug extends Component {
|
||||||
.saveDevice({ ...this.props.device, on })
|
.saveDevice({ ...this.props.device, on })
|
||||||
.catch((err) => console.error("smart plug update error", err));
|
.catch((err) => console.error("smart plug update error", err));
|
||||||
}else{
|
}else{
|
||||||
this.props.updateState({ id: this.props.sceneState.id, on: on},this.props.type);
|
this.props.updateState({ id: this.props.sceneState.id, on: on},this.props.sceneState.kind);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ class Thermostats extends Component {
|
||||||
.saveDevice({ ...this.props.device, turnOn })
|
.saveDevice({ ...this.props.device, turnOn })
|
||||||
.catch((err) => console.error("thermostat update error", err));
|
.catch((err) => console.error("thermostat update error", err));
|
||||||
}else{
|
}else{
|
||||||
this.props.updateState({ id: this.props.sceneState.id, turnOn: turnOn },this.props.type);
|
this.props.updateState({ id: this.props.sceneState.id, turnOn: turnOn },this.props.sceneState.kind);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ class Thermostats extends Component {
|
||||||
.saveDevice({ ...this.props.device, on })
|
.saveDevice({ ...this.props.device, on })
|
||||||
.catch((err) => console.error("thermostat update error", err));
|
.catch((err) => console.error("thermostat update error", err));
|
||||||
}else{
|
}else{
|
||||||
this.props.updateState({ id: this.props.sceneState.id, on: on },this.props.type);
|
this.props.updateState({ id: this.props.sceneState.id, on: on },this.props.sceneState.kind);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ class Thermostats extends Component {
|
||||||
.saveDevice({ ...this.props.device, targetTemperature })
|
.saveDevice({ ...this.props.device, targetTemperature })
|
||||||
.catch((err) => console.error("thermostat update error", err));
|
.catch((err) => console.error("thermostat update error", err));
|
||||||
}else{
|
}else{
|
||||||
this.props.updateState({id: this.props.sceneState.id, targetTemperature: targetTemperature},this.props.type);
|
this.props.updateState({id: this.props.sceneState.id, targetTemperature: targetTemperature},this.props.sceneState.kind);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ class Thermostats extends Component {
|
||||||
.saveDevice({ ...this.props.device, internalSensorTemperature })
|
.saveDevice({ ...this.props.device, internalSensorTemperature })
|
||||||
.catch((err) => console.error("thermostat update error", err));
|
.catch((err) => console.error("thermostat update error", err));
|
||||||
}else{
|
}else{
|
||||||
this.props.updateState({ id: this.props.sceneState.id, internalSensorTemperature:internalSensorTemperature },this.props.type);
|
this.props.updateState({ id: this.props.sceneState.id, internalSensorTemperature:internalSensorTemperature },this.props.sceneState.kind);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue