When I use HLK-SW16, I get the switch state is the opposite of the module state, how to solve
Confirm.I got the same issue.The state of the switch is inverted.
It’s a very new component. Open an issue on github:
Author of the HLK-SW16 module here, I don’t think it’s actually opposite although I can see how it would be confusing, the blue lights on each relay being on should indicate the circuit is open(off) and them being off should indicate closed(on). If you’d like to validate the behavior you can check using the manufacturer apps.
Hello, I have verified through the app, and the status is the same as that of the app, but when I control through the HA interface, it is the opposite
So the app shows the relay as green when the blue lights on the relays are on and red when the blue light is off?
Hello, yes, I connected a light bulb. When the relay turned on the blue light, the light was on, but the status displayed by HA was off
Since I’m a python beginner, I’m wondering if HA reads data in the opposite direction
Hmm, seems you are right about it being inverted, the devices I was using it with must have been reversed, either that or I had a different variant where the lights were wired differently, I’ll create a fix.
Thank you very much. I hope to get your repair as soon as possible. I will put it into test as soon as possible，This is my email address：[email protected]
Fix available here.
thank you very much, i will try
i had tried it’s ok
- HLK-SW04 : http://www.hlktech.net/product_detail.php?ProId=82
- HLK-SW02 : http://www.hlktech.net/product_detail.php?ProId=65
… supported as well by your module ?
Probably, if you get them and they don’t work send me a message and I’ll try and help you fix them.