Generic Output Button

The output button platform allows you to use any output component as a button. This can for example be used to momentarily set a GPIO pin using a button.

../../_images/generic-ui.png
# Example configuration entry
output:
  - platform: gpio
    pin: 25
    id: output1

button:
  - platform: output
    name: "Generic Output"
    output: output1
    duration: 500ms

Configuration variables:

  • name (Required, string): The name for the button.

  • id (Optional, ID): Manually specify the ID used for code generation.

  • output (Required, ID): The ID of the output component to use.

  • duration (Required, Time): How long the output should be set when the button is pressed.

  • All other options from Button.

Note

When used with a GPIO Output, the pin will be low by default and pulled high when the button is pressed. To invert this behaviour and have the pin pulled low when the button is pressed, set the inverted option in the Pin Schema.

See Also