Hello, I want the motion sensor to wait for 15 seconds before triggering in this scenario. I added a delay to the switch section, but it didn’t suit my needs.
The scenario here is to turn on the heater when motion is detected. However, I don’t want it to activate when there is a slight movement. For instance, I don’t want it to trigger when the door is opened and closed; I only want it to activate when someone is inside. In short, I need to add a 15-second delay to the motion sensor’s detection.
You’ll need to see how your motion sensor works in terms of the time it stays on after detecting movement.
If it only stays on for a short time, you should look at using wait_for_trigger in combination with continue_on_timeout: false to wait for a second motion detection.
If it stays on whilst motion is being detected, you could use a for: statement in the trigger:
trigger:
- platform: state
entity_id: binary_sensor.hareket_sensoru_hareket
to: 'on'
for: '00:00:15'
I understand; I will try this, and I believe it will work. I actually have one more issue. Currently, the heater turns off when the ambient temperature goes above 20 degrees and turns on automatically when it drops below 20 degrees. However, there is a problem here. If there is constant movement in the environment, it goes above 20 degrees, the system turns off, but when it drops below 20 degrees again, it does not turn on. So what is measured is that you will remain motionless, it will discharge from the sensor, it will fall, then you will move, then it triggers.The sensor does not trigger because it constantly detects movement. In other words, I need a command like ‘Run as long as there is movement in the environment’