diff --git a/front/src/routes/scene/edit-scene/triggers/DeviceFeatureState.jsx b/front/src/routes/scene/edit-scene/triggers/DeviceFeatureState.jsx
index 2cac11f1c8..d74d04edae 100644
--- a/front/src/routes/scene/edit-scene/triggers/DeviceFeatureState.jsx
+++ b/front/src/routes/scene/edit-scene/triggers/DeviceFeatureState.jsx
@@ -55,7 +55,7 @@ class TurnOnLight extends Component {
{binaryDevice && }
- {presenceDevice && }
+ {presenceDevice && }
{buttonClickDevice && }
{pilotWireModeDevice && }
{defaultDevice && }
diff --git a/front/src/routes/scene/edit-scene/triggers/device-states/PresenceSensorDeviceState.jsx b/front/src/routes/scene/edit-scene/triggers/device-states/PresenceSensorDeviceState.jsx
index e1a4d63307..8e086069f2 100644
--- a/front/src/routes/scene/edit-scene/triggers/device-states/PresenceSensorDeviceState.jsx
+++ b/front/src/routes/scene/edit-scene/triggers/device-states/PresenceSensorDeviceState.jsx
@@ -8,6 +8,18 @@ class PresenceSensorDeviceState extends Component {
this.props.updateTriggerProperty(this.props.index, 'threshold_only', false);
}
+ componentDidUpdate(prevProps) {
+ if (
+ prevProps.selectedDeviceFeature &&
+ this.props.selectedDeviceFeature &&
+ prevProps.selectedDeviceFeature.selector !== this.props.selectedDeviceFeature.selector
+ ) {
+ this.props.updateTriggerProperty(this.props.index, 'operator', '=');
+ this.props.updateTriggerProperty(this.props.index, 'value', 1);
+ this.props.updateTriggerProperty(this.props.index, 'threshold_only', false);
+ }
+ }
+
render() {
return (