9static const char *
const TAG =
"output.slow_pwm";
26 ESP_LOGV(TAG,
"Switching output pin %s to %s", pin_summary, ONOFF(new_state));
28 ESP_LOGV(TAG,
"Switching to %s", ONOFF(new_state));
50 ESP_LOGVV(TAG,
"End of period. State: %f, Scaled state: %f", this->
state_, scaled_state);
58 ESP_LOGCONFIG(TAG,
"Slow PWM Output:");
59 LOG_PIN(
" Pin: ", this->
pin_);
61 ESP_LOGCONFIG(TAG,
" State change automation configured");
64 ESP_LOGCONFIG(TAG,
" Turn on automation configured");
67 ESP_LOGCONFIG(TAG,
" Turn off automation configured");
71 " Restart cycle on state change: %s",
73 LOG_FLOAT_OUTPUT(
this);
uint32_t IRAM_ATTR HOT get_loop_component_start_time() const
Get the cached time in milliseconds from when the current component started its loop execution.
virtual void digital_write(bool value)=0
virtual size_t dump_summary(char *buffer, size_t len) const
Write a summary of this pin to the provided buffer.
virtual void turn_off()
Disable this binary output.
void set_output_state_(bool state)
turn on/off the configured output
bool restart_cycle_on_state_change_
void setup() override
Initialize pin.
void dump_config() override
unsigned int period_start_time_
void write_state(float state) override
std::unique_ptr< Trigger<> > turn_on_trigger_
std::unique_ptr< Trigger< bool > > state_change_trigger_
std::unique_ptr< Trigger<> > turn_off_trigger_
Providing packet encoding functions for exchanging data with a remote host.
constexpr size_t GPIO_SUMMARY_MAX_LEN
Maximum buffer size for dump_summary output.
Application App
Global storage of Application pointer - only one Application can exist.