19 LOG_SENSOR(
"",
"Pulse Width",
this);
20 LOG_UPDATE_INTERVAL(
this);
21 LOG_PIN(
" Pin: ", this->
pin_);
25 ESP_LOGCONFIG(TAG,
"'%s' - Got pulse width %.3f s", LOG_STR_ARG(this->
get_log_name()), width);
const LogString * get_log_name() const
Get the name for a "%s" log argument (LOG_STR_ARG).
void dump_config() override
PulseWidthSensorStore store_
Store data in a class that doesn't use multiple-inheritance (vtables in flash)
volatile uint32_t last_rise_
float get_pulse_width_s() const
static void gpio_intr(PulseWidthSensorStore *arg)
volatile uint32_t last_width_
void publish_state(float state)
Publish a new state to the front-end.
ESPHOME_LOG_TAG(TAG, "pulse_width")
uint32_t IRAM_ATTR HOT micros()