This is a device handler for the Zooz Q Sensor (ZSE11).
Power Source: DC vs Battery
The type of power source used while joining the device determines the type of device it’s joined as and it can’t be changed afterwards.
When the device is joined as a powered device it won’t report the battery level or go to sleep so if you try powering it by batteries they’ll probably die within a day.
When the device is joined as a battery device you can still power it by USB, but it behaves like a battery device so you have to manually wake the device up if you make changes to the settings.
I’ve noticed that motion reporting sometimes stops working after changing settings and/or manually waking the device up, but if you point it away from you for a few minutes it should start working again.
Device Handler Code