rainlake / homebridge-platform-lightify

MIT License
13 stars 5 forks source link

Motion sensor #21

Open kalety opened 5 years ago

kalety commented 5 years ago

With this fantastic plugin's new version, has exposed lightify motion sensor, but appears in HomeKit as contact sensor. It's possible that this change and shows in HomeKit as motion sensor?

Thanks in advance!

dalethomas81 commented 5 years ago

I believe there is a way but I do not have a motion sensor to test with. Right now the required library node-lightify does not differentiate between motion or contact. It only indicates that it is a sensor. I chose to make them contact sensors as that is what I have.

If you want them to show as motion sensors you can edit index.js and replace all instances of ‘Contact’ with ‘Motion’. I believe then they will all show as motion sensors.

You cannot have both at this time. If I can find a motion sensor for cheap one day I will buy it and test.