HclX / WyzeSensePy

A python script communicating with WyzeSense gateway
MIT License
91 stars 15 forks source link

Query latest states #16

Open kevdel opened 3 years ago

kevdel commented 3 years ago

For the contact switches, is there a way to query their state when i start up the sample.py script?

My sense bridge is on a raspberry pi and I'd like to keep the status of the sensors correct should I reboot the pi and miss a transition of state.

Thanks!

maage89 commented 3 years ago

Not sure if this helps you, but I figured out that there are raw events occurring every 4 hours, which contain the state (and other things) of the sensor. If you check the raw events, your sensors will only have an incorrect state for maximum 4 hours.

See my post here: https://github.com/HclX/WyzeSensePy/issues/17#issuecomment-731743639