Hi
I have a piston that isn’t behaving as expected… It is supposed to turn on a lamp when a door is opened, then turn it off again after a delay. The lamp is turning on as expected but not turning back off again…
What have I got wrong?
Hi
I have a piston that isn’t behaving as expected… It is supposed to turn on a lamp when a door is opened, then turn it off again after a delay. The lamp is turning on as expected but not turning back off again…
What have I got wrong?
Set TCP to never in your with.
When in edit mode click on the WITH.
Click on the settings cog and change TCP to never.
PS. Are you aware that there are presets for Time, Sunset and Sunrise. You do not need to use variables.
Excellent, thank you.
I was using variables because I’d completely forgotten about presets.
I think technically what is happening here and why you need TCP set to never is you are also closing the door right after opening it. So the close event cancels the wait command.
You’re using ‘Changes To’ which is a trigger.
When the door opens the trigger will become true. It will ignore the closure of the door.
After around 10 seconds the ‘Changes To’ will become false as it will need to wait for the door to open again.
When this happens, if TCP is set to cancel on trigger or condition state change, then the wait and turn off will cancel.
If it is set to never then the task will not cancel, unless the door is opened again before the wait matures. In this case the whole piston resets and will start again thus resetting the timer.
Hope that all makes sense.