Rpi_gpio - default to high

Hi, not super familiar with how gpios work. I have the following configuration:

  - platform: rpi_gpio
      11: Something

I want the gpio to have power by default. Is this what I achieve if I set invert_logic: true?
Or should I have something on HA startup to call a script and call switch.turn_on?

Invert will do it. When you turn the switch on the output will go low.

Be aware that different pins have different voltage levels before the platform is set up (after a restart some may be high, some low, until HA is ready).

If this is likely to be a problem, pick a (green) pin with “up” in the ‘Pull’ columns of this table:


On first sight… you reply looked scary. I was hoping for a simple “yes” :smiley:
But it’s simple enough. I was using 22, makes sense to use 24, set invert_logic to true and reverse my switch.turn_on/off code.

1 Like