a4refillpad / Xiaomi

my Xiaomi Device Handlers for Smartthings
Apache License 2.0
248 stars 1.85k forks source link

Wrong value was being used for the last press timestamp. #16

Open blafrisch opened 6 years ago

blafrisch commented 6 years ago

The "date" property returned with latestState() appears to be the cassandra column timestamp. "value" is the actual value but it's stored as a string and must be cast back to Long.

blafrisch commented 6 years ago

I'll add that I verified that "value" was the correct value and "date.getTime()" the wrong value by doing debug logs in createPressEvent and createButtonEvent and verifying that they matched.