other minor fixes

This commit is contained in:
Claudio Maggioni (maggicl) 2020-05-03 18:13:50 +02:00
parent 0252870c70
commit c7dc34eedc
4 changed files with 5 additions and 5 deletions

View file

@ -136,7 +136,7 @@ class Light extends Component {
<div style={LightDimmerContainer}> <div style={LightDimmerContainer}>
<CircularInput <CircularInput
style={LightDimmerStyle} style={LightDimmerStyle}
value={+(Math.round(this.state.intensity / 100 + "e+2") + "e-2")} value={+(Math.round(this.intensity / 100 + "e+2") + "e-2")}
onChange={this.setIntensity} onChange={this.setIntensity}
onMouseUp={this.saveIntensity} onMouseUp={this.saveIntensity}
> >

View file

@ -25,7 +25,6 @@ class Thermostats extends Component {
measuredTemperature: this.props.device.measuredTemperature, measuredTemperature: this.props.device.measuredTemperature,
useExternalSensors: this.props.device.useExternalSensors, useExternalSensors: this.props.device.useExternalSensors,
}; };
console.log(this.state);
this.setMode = this.setMode.bind(this); this.setMode = this.setMode.bind(this);
this.setTargetTemperature = this.setTargetTemperature.bind(this); this.setTargetTemperature = this.setTargetTemperature.bind(this);
} }
@ -34,13 +33,11 @@ class Thermostats extends Component {
if (this.state.timeout) { if (this.state.timeout) {
clearTimeout(this.state.timeout); clearTimeout(this.state.timeout);
} }
console.log(mode);
//i came to the conclusion that is not possible to set mode. //i came to the conclusion that is not possible to set mode.
// Good job Jacob (Claudio) // Good job Jacob (Claudio)
//this.mode = "HEATING"; //this.mode = "HEATING";
const turnOn = mode; const turnOn = mode;
console.log(turnOn);
if (this.props.tab === "Devices") { if (this.props.tab === "Devices") {
this.props this.props
.saveDevice({ ...this.props.stateOrDevice, turnOn }) .saveDevice({ ...this.props.stateOrDevice, turnOn })

View file

@ -32,6 +32,10 @@ function getRoomName(state, ownProps) {
return (state.rooms[getDevice(state, ownProps).roomId] || {}).name; return (state.rooms[getDevice(state, ownProps).roomId] || {}).name;
case "Hosts": case "Hosts":
return "Room Name not implemented yet"; return "Room Name not implemented yet";
default:
throw new Error(
`room name has no value in tab "${state.active.activeTab}"`
);
} }
} }

View file

@ -31,7 +31,6 @@ class Login extends Component {
.login(this.state.user, this.state.password) .login(this.state.user, this.state.password)
.then(() => this.props.history.push("/dashboard")) .then(() => this.props.history.push("/dashboard"))
.catch((err) => { .catch((err) => {
console.log("CIAO", err);
this.setState({ this.setState({
error: { state: true, message: err.messages.join(" - ") }, error: { state: true, message: err.messages.join(" - ") },
}); });