Danielhiversen / PyXiaomiGateway

PyXiaomiGateway
MIT License
152 stars 55 forks source link

Add switch.b2lacn02 support #187

Closed zyadvanced closed 3 years ago

zyadvanced commented 3 years ago

Home Assistant release with the issue (if applicable): 0.115.1

Last working Home Assistant release (if known):

PyXiaomiGateway library version (if known): 0.13.3

Operating environment (Hass.io/Docker/Windows/etc.): Raspberry Pi OS

Traceback (if applicable):

Unsupported device found! Please create an issue at https://github.com/Danielhiversen/PyXiaomiGateway/issues and provide the following data: {'cmd': 'read_rsp', 'model': 'switch.b2lacn02', 'sid': '158d0005220752', 'params': [{'battery_voltage': 3300}]}

Description of the bug: I found similar report in the closed issues, but their model is "switch_b1lacn02", not "switch.b1lacn02" in my case, guess "switch.b1lacn02" might be a new model.

zyadvanced commented 3 years ago

BTW, I tried to add "switch.b1lacn02" in device_types definition of file "init.py", the error was gone, but the switch was not added to HA.

syssi commented 3 years ago

HA needs to be updated/fixed, too.

zyadvanced commented 3 years ago

Thx, I will try later.

zyadvanced commented 3 years ago

HA needs to be updated/fixed, too.

Excuse me, do you have any clue when the fixes mentioned above will apply to HA release? I kept following the latest releases(currently 0.117.5), but the error is still there.

syssi commented 3 years ago

It will be part of 0.118.

zyadvanced commented 3 years ago

It will be part of 0.118.

Got it, thx