8static const char *
const TAG =
"output.slow_pwm";
25 ESP_LOGV(TAG,
"Switching output pin %s to %s", pin_summary, ONOFF(new_state));
27 ESP_LOGV(TAG,
"Switching to %s", ONOFF(new_state));
49 ESP_LOGVV(TAG,
"End of period. State: %f, Scaled state: %f", this->
state_, scaled_state);
57 ESP_LOGCONFIG(TAG,
"Slow PWM Output:");
58 LOG_PIN(
" Pin: ", this->
pin_);
60 ESP_LOGCONFIG(TAG,
" State change automation configured");
63 ESP_LOGCONFIG(TAG,
" Turn on automation configured");
66 ESP_LOGCONFIG(TAG,
" Turn off automation configured");
70 " Restart cycle on state change: %s",
72 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_
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.