diff --git a/front/src/components/boxs/device-in-room/device-features/ColorDeviceFeature.jsx b/front/src/components/boxs/device-in-room/device-features/ColorDeviceFeature.jsx index 2f27a4dedd..a5d2f259b4 100644 --- a/front/src/components/boxs/device-in-room/device-features/ColorDeviceFeature.jsx +++ b/front/src/components/boxs/device-in-room/device-features/ColorDeviceFeature.jsx @@ -64,7 +64,7 @@ class ColorDeviceType extends Component { componentDidMount() { const deviceLastValue = this.props.deviceFeature.last_value; - const color = deviceLastValue === null ? undefined : `#${intToHex(deviceLastValue)}`; + const color = !deviceLastValue ? undefined : `#${intToHex(deviceLastValue)}`; this.colorPicker = new iro.ColorPicker(this.colorPickerRef.current, { width: 150, diff --git a/front/src/components/boxs/device-in-room/device-features/MultiLevelDeviceFeature.jsx b/front/src/components/boxs/device-in-room/device-features/MultiLevelDeviceFeature.jsx index f1e590d02f..1f96d9acda 100644 --- a/front/src/components/boxs/device-in-room/device-features/MultiLevelDeviceFeature.jsx +++ b/front/src/components/boxs/device-in-room/device-features/MultiLevelDeviceFeature.jsx @@ -7,7 +7,7 @@ const MultiLevelDeviceType = ({ children, ...props }) => { props.y, props.device, props.deviceFeature, - props.roomIndex, + props.deviceIndex, props.deviceFeatureIndex, e.target.value, props.deviceFeature.lastValue