Using the https://home-assistant.io/components/switch.rpi_gpio/
It appears the Inverted_Logic function is a global function and applies to all switches, is it possible to apply the inverted logic on an individual pin basis? IE Harwdare logic that I’m driving has a combination of GPIOs with some pins active high and other are active low.
I have the same issue. I have one Relay I want to keep NC, so if the rPi goes offline or reboots or whatever, there is power flowing through the relay. The other relays need to stay NO, so I cant invert_logic on all the GPIO pins. Maybe there is a hardware workaround? It just bothers me that my HA GUI says the switch is ‘off’ and it’s actually ‘on’, and vise-versa. There is got to be a relatively painless way to do this. It seems so simple.
I have the same challenge. I know I can use template, but having possibility to manage it on the configuration level will be much cleaner and “one-entity-less”…
I believe each pin should be able to be configured as inverted. Also the option for pull-up or pull-down should be possible to select by each GPIO. Checking raspberry documentation I found this one https://www.raspberrypi.org/documentation/configuration/config-txt/gpio.md where it seems possible to change some options for each GPIO (unfortunately there is no command for inverted logic).
Stand to be corrected but believe this doesn’t resolve the issue of setting a individual pin to either invert or not.
The link is an example of a global setting for all the pins you nominated to invert in - platform: rpi_gpio . You can’t then nominate another group of pins to not invert.