lazcad / homeassistant

Home Assistant Development
249 stars 83 forks source link

Use correct attribute for battery. #32

Closed abmantis closed 7 years ago

abmantis commented 7 years ago

Conversion values are according to the documentation in https://github.com/louisZL/lumi-gateway-local-api

This is tested and is working with the new firmware.

tam-wh commented 7 years ago

I haven't tested this but does it works in the existing firmware?

abmantis commented 7 years ago

@ravetam it works with 1.4.1_144.0141 gateway firmware. For the 143 firmware it will have no effect, but won't cause any issues.

tam-wh commented 7 years ago

You got an firmware update already? I'm still on 143 and it says I'm on the latest version

abmantis commented 7 years ago

@ravetam Yes. Xiaomi put me in contact with one of their devs (regarding the ghost events issue), and he updated the firmware on the gateway.

DuckY1987 commented 7 years ago

@abmantis did the engineer answer you? xiaomi did the same with me, i was mailing him with my bug fix request, a while ago but never got answered but since then i had the feeling they fixed it in the firmware, as i didnt get ghost openings anymore.

abmantis commented 7 years ago

@DuckY1987 he did after a while, but the ghost issue is not resolved.

aferraz commented 7 years ago

@ravetam I can confirm that work. Today I received the new firmware and with the code change I can see battery %.

tam-wh commented 7 years ago

Great! Thanks for the nice work! Got a lot of things to catch up