diff --git a/front/src/routes/scene/edit-scene/triggers/DeviceFeatureState.jsx b/front/src/routes/scene/edit-scene/triggers/DeviceFeatureState.jsx index da36e5c264..78a1832604 100644 --- a/front/src/routes/scene/edit-scene/triggers/DeviceFeatureState.jsx +++ b/front/src/routes/scene/edit-scene/triggers/DeviceFeatureState.jsx @@ -36,7 +36,12 @@ class TurnOnLight extends Component { if (value.includes(',')) { value = value.replaceAll(',', '.'); } - this.props.updateTriggerProperty(this.props.index, 'value', value); + const lastCharacter = value.length > 0 ? value[value.length - 1] : ''; + if (!isNaN(parseFloat(e.target.value)) && lastCharacter !== '.') { + this.props.updateTriggerProperty(this.props.index, 'value', parseFloat(value)); + } else { + this.props.updateTriggerProperty(this.props.index, 'value', value); + } }; handleValueChangeBinary = newValue => () => { this.props.updateTriggerProperty(this.props.index, 'value', newValue);