9#define LOG_FLOAT_OUTPUT(this) \
10 LOG_BINARY_OUTPUT(this) \
11 if (this->max_power_ != 1.0f) { \
12 ESP_LOGCONFIG(TAG, " Max Power: %.1f%%", this->max_power_ * 100.0f); \
14 if (this->min_power_ != 0.0f) { \
15 ESP_LOGCONFIG(TAG, " Min Power: %.1f%%", this->min_power_ * 100.0f); \
Base class for all output components that can output a variable level, like PWM.
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_min_power() const
Get the minimum power output.
void set_max_power(float max_power)
Set the maximum power output of this component.
virtual void write_state(float state)=0
void set_zero_means_zero(bool zero_means_zero)
Sets this output to ignore min_power for a 0 state.
float get_max_power() const
Get the maximum power output.
void write_state(bool state) override
Implement BinarySensor's write_enabled; this should never be called.
void set_min_power(float min_power)
Set the minimum power output of this component.
Providing packet encoding functions for exchanging data with a remote host.