h4 / lywsd02

MIT License
169 stars 34 forks source link

Setting Time for Timezones with half hour offsets #20

Closed David0669 closed 4 years ago

David0669 commented 4 years ago

Thanks so much for your work, it works really well. Unfortunately I live in a timezone that is 9.5 hours ahead of UTC and have not been able to set the time correctly. I note that the offsets for the time are set as integers in the code. I am wondering if it is possible to have 0.5 hour offsets for the LYWSD02?

h4 commented 4 years ago

Can you set timezone offset properly using Xiaomi Home application? If it's possible I'll try to adopt my library.

David0669 commented 4 years ago

No. The Xiaomi Home application only sets the offsets in whole hour increments. It maybe a limitation in the LYWSD02 firmware?

h4 commented 4 years ago

@David0669 I tried to play with my phone. When timezone changing from MSK to LND – display on thermometer changes, but when I set Darwin – Clock doesn't change, but C/F switch works well.

Unfortunately, looks like it is LYWSD02 firmware limitation, and it not possible to set TZ with floated point.

By the way — thank you very much for your issue, now I know that there are a lot of places where timezone is not round integer, it was surprising me.