I messed around with modifying the device type for a SmartSense motion sensor, to add
enable() functionality. The code was easy, but I ran into some weird bug in the backend that stopped it from working.
But then, thinking about it more (and forced by circumstance), I decided it’s better to do this at the app level instead. I had two “special” modes in my setup, both for this sort of purpose. That’s a very poor solution, fraught with problems. I have been using custom apps for the two rooms where I wanted motion disable functionality, so why not just put it there in my own app?
That’s what I did, and it works really well; it took about 5 lines of new code to implement. I use a virtual on/off button to enable/disable motion activation. Now, I can use Routines, Smart Light scheduled events, and Minimote button presses, to turn that disable switch on or off. Problem solved. Note that this solution is built into my custom app. It would be easy to add to any custom lighting app that handles motion events. ST could add it to Smart Lights, but they won’t, because it could just confuse most users and dirty up the UI (by one line).
Then I went back and deleted the two special modes, leaving my setup quite sleek, with only Away, Day, Evening and Night modes. And I threw away all of the helper apps used to cope with the extra modes. Ahh…