ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
esphome::output::ApplyFloatOutput< Fn > Class Template Referencefinal

Calls the codegen-generated Fn(this, index, state) with the scaled, inverted level; the hub is baked into Fn. More...

#include <float_output.h>

Inheritance diagram for esphome::output::ApplyFloatOutput< Fn >:
esphome::output::FloatOutput esphome::output::BinaryOutput

Public Member Functions

 ApplyFloatOutput (uint16_t index=0)
 
- Public Member Functions inherited from esphome::output::FloatOutput
void set_max_power (float max_power)
 Set the maximum power output of this component.
 
void set_min_power (float min_power)
 Set the minimum power output of this component.
 
void set_zero_means_zero (bool zero_means_zero)
 Sets this output to ignore min_power for a 0 state.
 
template<bool _use_output_float_power_scaling = false>
void set_max_power (float max_power)
 
template<bool _use_output_float_power_scaling = false>
void set_min_power (float min_power)
 
template<bool _use_output_float_power_scaling = false>
void set_zero_means_zero (bool zero_means_zero)
 
void set_level (float state)
 Set the level of this float output, this is called from the front-end.
 
virtual void update_frequency (float frequency)
 Set the frequency of the output for PWM outputs.
 
float get_max_power () const
 Get the maximum power output.
 
float get_min_power () const
 Get the minimum power output.
 
float get_max_power () const
 Get the maximum power output.
 
float get_min_power () const
 Get the minimum power output.
 
- Public Member Functions inherited from esphome::output::BinaryOutput
void set_inverted (bool inverted)
 Set the inversion state of this binary output.
 
void set_power_supply (power_supply::PowerSupply *power_supply)
 Use this to connect up a power supply to this output.
 
virtual void set_state (bool state)
 Enable or disable this binary output.
 
virtual void turn_on ()
 Enable this binary output.
 
virtual void turn_off ()
 Disable this binary output.
 
bool is_inverted () const
 Return whether this binary output is inverted.
 

Protected Member Functions

void write_state (float state) override
 
- Protected Member Functions inherited from esphome::output::FloatOutput
void write_state (bool state) override
 Implement BinarySensor's write_enabled; this should never be called.
 
- Protected Member Functions inherited from esphome::output::BinaryOutput

Protected Attributes

uint16_t index_
 
- Protected Attributes inherited from esphome::output::FloatOutput
float max_power_ {1.0f}
 
float min_power_ {0.0f}
 
bool zero_means_zero_ {false}
 
- Protected Attributes inherited from esphome::output::BinaryOutput
bool inverted_ {false}
 
power_supply::PowerSupplyRequester power_ {}
 

Detailed Description

template<auto Fn>
class esphome::output::ApplyFloatOutput< Fn >

Calls the codegen-generated Fn(this, index, state) with the scaled, inverted level; the hub is baked into Fn.

The index (a hub's channel) is data, so all channels of a hub share one instantiation.

Definition at line 135 of file float_output.h.

Constructor & Destructor Documentation

◆ ApplyFloatOutput()

template<auto Fn>
esphome::output::ApplyFloatOutput< Fn >::ApplyFloatOutput ( uint16_t index = 0)
inlineexplicit

Definition at line 137 of file float_output.h.

Member Function Documentation

◆ write_state()

template<auto Fn>
void esphome::output::ApplyFloatOutput< Fn >::write_state ( float state)
inlineoverrideprotectedvirtual

Implements esphome::output::FloatOutput.

Definition at line 140 of file float_output.h.

Field Documentation

◆ index_

template<auto Fn>
uint16_t esphome::output::ApplyFloatOutput< Fn >::index_
protected

Definition at line 142 of file float_output.h.


The documentation for this class was generated from the following file: