This is a device handler for the HomeSeer Motion Sensor (HS-MS100+).
Shows if it was joined as a DC powered repeater or sleeping battery device
If the device was joined on DC power it’s not possible to get the battery level or conditionally hide it at the moment so it will always be 100%
Supports all of the device’s configuration parameters
USB Powered Repeater
If you join the device as a repeater by holding the button for 5 seconds then you can’t power it by just the battery in the future because the battery won’t last more than 24 hours.
You can leave a battery in it as a backup, but the battery level will always show 100% because the device can’t report the battery level when joined as a powered device.
If you join it as a battery device by pushing the button 1x or 3x then you can power it by USB or battery, but you’ll need to manually wake the device up by holding the button until it starts blinking.
The manual says to push the button 4x, but that doesn’t send a wake up notification so the handler won’t know the device is awake and won’t send the changes to it.
Device Handler Code