OpenWonderLabs / python-host

The python code running on Raspberry Pi or other Linux based boards to control SwitchBot.
Apache License 2.0
379 stars 84 forks source link

Fix motion sensor light status read wrong bits #30

Closed kagemomiji closed 3 years ago

kagemomiji commented 3 years ago

Hello.

I tried to use a 'Motion Sensor', but it would not work.

According to Motion Sensor BLE, the light staus is in 5byte [0:1]bits.

Howerver, your code reads value[13:14] which means 4byte [0:1]bits.

Please check my fix. Thank you.