ESPHome
2026.6.0-dev
Loading...
Searching...
No Matches
esphome
components
bl0940
button
calibration_reset_button.cpp
Go to the documentation of this file.
1
#include "
calibration_reset_button.h
"
2
#include "
../bl0940.h
"
3
#include "
esphome/core/hal.h
"
4
#include "
esphome/core/log.h
"
5
#include "
esphome/core/application.h
"
6
7
namespace
esphome::bl0940
{
8
9
static
const
char
*
const
TAG =
"bl0940.button.calibration_reset"
;
10
11
void
CalibrationResetButton::dump_config
() { LOG_BUTTON(
""
,
"Calibration Reset Button"
,
this
); }
12
13
void
CalibrationResetButton::press_action
() {
14
ESP_LOGI(TAG,
"Resetting calibration defaults..."
);
15
this->
parent_
->reset_calibration();
16
}
17
18
}
// namespace esphome::bl0940
application.h
bl0940.h
calibration_reset_button.h
esphome::Parented< BL0940 >::parent_
BL0940 * parent_
Definition
helpers.h:1872
esphome::bl0940::CalibrationResetButton::dump_config
void dump_config() override
Definition
calibration_reset_button.cpp:11
esphome::bl0940::CalibrationResetButton::press_action
void press_action() override
Definition
calibration_reset_button.cpp:13
hal.h
log.h
esphome::bl0940
Definition
bl0940.cpp:5
Generated by
1.12.0