Hi.
I want to control a garage door with HA. I see the gpio module alreay does that with the cover module.
I mounted a MCP23017 chip on an expansion board (example python managing software here) connected via i2c. I see for managing i2c I need to use the binary_sensor module, but I don’t understand how this latest works with the rest of the system.
Should I configure the binary sensors for enabling the i2c, and then use the PINs from the binary config for cover?
so that I can detect the state via the sensor and control the door via the switch.
First weird thing happening: my expansion board has LEDs showing the state of the pins. With the wrong (default) 0x20 i2c address I can see the input status led turning on and off. Now that I’ve entered 0x27 the input led is always on. I can only see a very little intensity change when I change the switch status on HA interface (which is still weird because that should control the output pins, while this is an input one!).
Other than this, which is probably and hardware issue I’m failing to understand, there’s the template config. The example uses i.e. switch.garage_door, but I don’t get where this is configured. In the switch configuration I see you can set pin numbers and configuration names, but those can contain spaces and doesn’t seem to fit there.