Closed dawiyo closed 5 years ago
Any movement on this?
I have had an issue with this as well. Found that by changing the devices/binary_sensor.py file to check for STATUS_ONLINE instead of STATUS_OFFLINE I can get the binary sensor to trigger on a motion event. Looks like the binary sensors report that they are ONLINE at all times unless they are being triggered when they go to 'Motion Detected!' state for the Occupancy sensor.
The solution by @SeattlePaulus worked for me too, so perhaps that could be included?
Just made a pull request with this change. Tested with an Abode Indoor Motion sensor. According to Abode support, the indoor motion sensor is basically treated the same as the occupancy sensor as in both will report motion status even when Abode is in standby. The indoor motion sensor appears to have a cool down timer of 1 minute (not sure about the occupancy sensor as I don't have one). When you pair it to Abode, it also shows up as an occupancy sensor.
Edit: So by simply changing STATUS_OFFLINE
to STATUS_ONLINE
in the return
statement, it works but key fobs and water sensors show the incorrect state. I committed a change that checks if the device is an occupancy sensor and if it is, then return the state if the status is not STATUS_ONLINE
.
Fixed with #40 and released in abodepy-0.15.0
In case this helps
No motion
Motion detected