diff --git a/smart-hut/src/components/dashboard/devices/Light.js b/smart-hut/src/components/dashboard/devices/Light.js index 18787e5..917eba0 100644 --- a/smart-hut/src/components/dashboard/devices/Light.js +++ b/smart-hut/src/components/dashboard/devices/Light.js @@ -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), + }); } }); };