I am looking for a way to programmatically disable and enable an Insteon motion sensor.
Here's the deal ...
I have a scene made up of a bunch of light switches, and I have a motion sensor in the scene. All works well, and lights turn on when the sensor is activated and off after a set time of inactivity. But, I need to sometimes turn off that functionality, so that lights just stay on.
My initial solution was to remove the motion sensor from the scene, and instead have it call a program when turned on or off. The program then turns the scene of or off as needed. And programs are easier to disable or enable (or can contain conditional logic). But that's not clean. For example, consider this scenario: A: Motion sensor turns on so program runs and lights turn on. B: User leaves room and turns lights off manually. C: User returns to room before motion sensor timeout, so motion sensor is still on even though the lights are not, and lights don't turn back on.
I can't have a program that, when all lights are turned off, turns off the motion sensor, as that's a status only device. So, the ideal option would be to include the motion sensor in the scene, and just have a way to programmatically enable and disable it.
Thoughts?
--- Ben