Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-key switch only shows one switch #1320

Closed
hyoukaija opened this issue Apr 5, 2024 · 5 comments
Closed

Multi-key switch only shows one switch #1320

hyoukaija opened this issue Apr 5, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@hyoukaija
Copy link

截屏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.
@AlexxIT AlexxIT added the question Further information is requested label Apr 5, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Apr 5, 2024

You need to write converter for your device

@hyoukaija
Copy link
Author

How to do it?

@AlexxIT
Copy link
Owner

AlexxIT commented Apr 5, 2024

https://github.com/AlexxIT/XiaomiGateway3#add-new-device

@hyoukaija
Copy link
Author

hyoukaija commented Apr 6, 2024

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`

@AlexxIT
Copy link
Owner

AlexxIT commented Apr 7, 2024

@AlexxIT AlexxIT added enhancement New feature or request and removed question Further information is requested labels Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants