8static const char *
const TAG =
"output.slow_pwm";
23 ESP_LOGV(TAG,
"Switching output pin %s to %s", this->
pin_->
dump_summary().c_str(), ONOFF(new_state));
25 ESP_LOGV(TAG,
"Switching to %s", ONOFF(new_state));
47 ESP_LOGVV(TAG,
"End of period. State: %f, Scaled state: %f", this->
state_, scaled_state);
55 ESP_LOGCONFIG(TAG,
"Slow PWM Output:");
56 LOG_PIN(
" Pin: ", this->
pin_);
58 ESP_LOGCONFIG(TAG,
" State change automation configured");
61 ESP_LOGCONFIG(TAG,
" Turn on automation configured");
64 ESP_LOGCONFIG(TAG,
" Turn off automation configured");
66 ESP_LOGCONFIG(TAG,
" Period: %d ms", this->
period_);
68 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 std::string dump_summary() const =0
virtual void digital_write(bool value)=0
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.
Application App
Global storage of Application pointer - only one Application can exist.