Skip to content

Output Component

Each platform of the output domain exposes some output to ESPHome. These are grouped into two categories: binary outputs (that can only be ON/OFF) and float outputs (like PWM, can output any rational value between 0 and 1).

Each output platform extends this configuration schema.

# Example configuration entry
output:
- platform: ...
id: my_output_id
power_supply: power_supply_id
inverted: false
min_power: 0.01
max_power: 0.75

Configuration variables:

  • id (Required, ID): The id to use for this output component.

  • power_supply (Optional, ID): The power supply to connect to this output. When the output is enabled, the power supply will automatically be switched on too.

  • inverted (Optional, boolean): If the output should be treated as inverted. Defaults to false.

Float outputs only:

  • min_power (Optional, float): Sets the minimum output value of this output platform. Must be in range from 0 to max_power. Defaults to 0. If zero_means_zero is false this will be output value when the entity is turned off.

  • max_power (Optional, float): Sets the maximum output value of this output platform. Must be in range from min_power to 1. Defaults to 1.

  • zero_means_zero (Optional, boolean): Sets the output to use actual 0 instead of min_power. Defaults to false.

NOTE

The min_power and max_power values are automatically clamped to ensure 0.0 ≤ min_power ≤ max_power ≤ 1.0. This prevents invalid configurations and ensures stable output behavior.

This action turns the output with the given ID on when executed.

on_...:
then:
- output.turn_on: light_1

NOTE

This action can also be expressed in lambdas:

id(light_1).turn_on();

This action turns the output with the given ID off when executed.

on_...:
then:
- output.turn_off: light_1

NOTE

This action can also be expressed in lambdas:

id(light_1).turn_off();

This action sets the float output to the given level when executed.

NOTE

This only works with floating point outputs like Ac Dimmer, Esp8266 Pwm, Ledc, Sigma Delta Output, Slow Pwm.

on_...:
then:
- output.set_level:
id: light_1
level: 50%

NOTE

This action can also be expressed in lambdas:

// range is 0.0 (off) to 1.0 (on)
id(light_1).set_level(0.5);

This action sets the minimum output power level for the specified float output platform. It allows you to dynamically adjust the min_power configuration variable at runtime.

NOTE

This only works with floating point outputs like Ac Dimmer, Esp8266 Pwm, Ledc, Sigma Delta Output, Slow Pwm.

on_...:
then:
- output.set_min_power:
id: light_1
min_power: 20%

NOTE

This action can also be expressed in lambdas:

// range is 0.0 (off) to 1.0 (on)
id(light_1).set_min_power(0.2);

This action sets the maximum output power level for the specified float output platform. It allows you to dynamically adjust the max_power configuration variable at runtime.

NOTE

This only works with floating point outputs like Ac Dimmer, Esp8266 Pwm, Ledc, Sigma Delta Output, Slow Pwm.

on_...:
then:
- output.set_max_power:
id: light_1
max_power: 80%

NOTE

This action can also be expressed in lambdas:

// range is 0.0 (off) to 1.0 (on)
id(light_1).set_max_power(0.8);