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}>
<CircularInput
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}
onMouseUp={this.saveIntensity}
>

View File

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

View File

@ -32,6 +32,10 @@ function getRoomName(state, ownProps) {
return (state.rooms[getDevice(state, ownProps).roomId] || {}).name;
case "Hosts":
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)
.then(() => this.props.history.push("/dashboard"))
.catch((err) => {
console.log("CIAO", err);
this.setState({
error: { state: true, message: err.messages.join(" - ") },
});