GPIO Output
The GPIO output component is quite simple: It exposes a single GPIO pin as an output component. Note that output components are not switches and will not show up in Home Assistant. See Gpio.
# Example configuration entryoutput: - platform: gpio pin: GPIOXX id: gpio_d1Configuration variables
Section titled “Configuration variables”- pin (Required, Pin Schema): The pin to turn on and off.
- id (Required, ID): The id to use for this output component.
- All other options from Output.
NOTE
With hold_state: true on the pin, an ESP32 keeps the output level through deep sleep and reboots. Components such
as lights write their state again on boot through restore_mode, so nothing more is needed. An output driven only
by automations or lambdas is not written until the next action, so set it in on_boot if it needs a known level.
If the output has a Power Supply, enable hold_state on the power supply pin as well.
WARNING
This is an output component and will not be visible from the frontend. Output components are intermediary components that can be attached to for example lights. To have a GPIO pin in the Home Assistant frontend, please see the Gpio.