Changes to virtual contact sensor?

I’m using a simulated contact sensor to show status of two real contact sensors being controlled via webCoRE, but one thing I’ve noticed about virtual contact sensors is they can be controlled in the SmartThings app simply by pressing them and it’ll change status from open to close to open easily. My question is this: can I prevent status from being changed through button pushes and limit it to only webCoRE changes?

Doubt it. That is the point to the “virtual” anything. It allows you to mimic a real device so changing its state is by its nature what is required.

Possibly if you built a custom DH you may be able to disable that ability but you need to talk with a developer.

And yes @anon36505037 crushed it with the code. Did exactly what I was looking for.

2 Likes

@anon36505037 would i be able to use same additions to code for a uDTH device? I’m using a light sensor I’d like to eliminate manual control of.

I’m using the light sensor and you can turn it on and off.

Thanks once again!