Merge branch '64-fix-dimmable-light-input' into 'dev'
fixed dimmable light input Closes #64 See merge request sa4-2020/the-sanmarinoes/frontend!67
This commit is contained in:
commit
8952aea4bb
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);
|
||||
call.deviceUpdate(this.props.device, "dimmableLight").then((res) => {
|
||||
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