ESPHome
2026.11.0-dev
Loading...
Searching...
No Matches
esphome
components
espectre
button
espectre_button.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/defines.h
"
4
5
#ifdef USE_ESPECTRE
6
7
#include "
esphome/components/button/button.h
"
8
#include "
../espectre.h
"
9
10
namespace
esphome::espectre
{
11
12
class
RecalibrateButton
final :
public
button::Button
,
public
Parented
<ESPectreComponent> {
13
protected
:
14
void
press_action
()
override
{ this->
parent_
->recalibrate(); }
15
};
16
17
}
// namespace esphome::espectre
18
19
#endif
// USE_ESPECTRE
button.h
esphome::Parented
Helper class to easily give an object a parent of type T.
Definition
helpers.h:1997
esphome::Parented< ESPectreComponent >::parent_
ESPectreComponent * parent_
Definition
helpers.h:2008
esphome::button::Button
Base class for all buttons.
Definition
button.h:25
esphome::espectre::RecalibrateButton
Definition
espectre_button.h:12
esphome::espectre::RecalibrateButton::press_action
void press_action() override
Definition
espectre_button.h:14
defines.h
espectre.h
esphome::espectre
Definition
espectre_button.h:10
Generated by
1.12.0