fixed dimmable light input
This commit is contained in:
parent
228ada3305
commit
5d9d077b48
1 changed files with 4 additions and 1 deletions
|
@ -68,7 +68,10 @@ export default class Light extends Component {
|
||||||
Math.round(newValue * 100) <= 1 ? 1 : Math.round(newValue * 100);
|
Math.round(newValue * 100) <= 1 ? 1 : Math.round(newValue * 100);
|
||||||
call.deviceUpdate(this.props.device, "dimmableLight").then((res) => {
|
call.deviceUpdate(this.props.device, "dimmableLight").then((res) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
this.setState({ intensity: newValue });
|
this.setState({
|
||||||
|
intensity:
|
||||||
|
Math.round(newValue * 100) <= 1 ? 1 : Math.round(newValue * 100),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue