AlexxIT / XiaomiGateway3

Home Assistant custom component for control Xiaomi Multimode Gateway (aka Gateway 3), Xiaomi Multimode Gateway 2, Aqara Hub E1 on default firmwares over LAN

Home Page:https://github.com/AlexxIT/Blog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multi-key switch only shows one switch

hyoukaija opened this issue · comments

截屏2024-04-05 20 44 13 My switch is a two-button switch, but only one is displayed. It was normal at first, but I started encountering this problem 1-2 months ago. Please tell me how to fix it
  • Upgrading to 4.0.2 cannot solve the problem
  • Restarting the device or re-adding the device cannot solve the problem.

You need to write converter for your device

How to do it?

The link above is very helpful, thank you very much, I attached my code, I hope it can be a reference for others

`from custom_components.xiaomi_gateway3.core.devices import *

DEVICES = [
{
# dual channel on/off, power measurement
9610: ["bean", "Double Wall Switch", "bl02"],
"spec": [
BaseConv("channel_1", "switch", mi="2.p.1"),
BaseConv("channel_2", "switch", mi="3.p.1"),
BaseConv("led", "switch", mi="8.p.1"),
],
},] + DEVICES`