25 LOG_SWITCH(
"",
"H-Bridge Switch",
this);
26 LOG_PIN(
" On Pin: ", this->
on_pin_);
27 LOG_PIN(
" Off Pin: ", this->
off_pin_);
28 ESP_LOGCONFIG(TAG,
" Pulse length: %" PRId32
" ms", this->
pulse_length_);
30 ESP_LOGCONFIG(TAG,
" Wait time %" PRId32
" ms", this->
wait_time_);
void set_timeout(const char *name, uint32_t timeout, std::function< void()> &&f)
Set a timeout function with a const char* name.
virtual void digital_write(bool value)=0
void write_state(bool state) override
void dump_config() override
float get_setup_priority() const override
bool state
The current reported state of the binary sensor.
void restore()
Drive the switch to the state its restore mode yields, through control(), so inversion and write_stat...
void publish_state(bool state)
Publish a state to the front-end from the back-end.
ESPHOME_LOG_TAG(TAG, "fan.hbridge")
@ RELAY_STATE_SWITCHING_ON
@ RELAY_STATE_SWITCHING_OFF
constexpr float HARDWARE
For components that deal with hardware and are very important like GPIO switch.