ESPHome
2026.11.0-dev
Loading...
Searching...
No Matches
esphome
components
haier_tundra
button
haier_tundra_button.cpp
Go to the documentation of this file.
1
#include "
haier_tundra_button.h
"
2
#include "
esphome/core/log.h
"
3
4
namespace
esphome::haier_tundra
{
5
6
ESPHOME_LOG_TAG
(TAG,
"haier_tundra.button"
);
7
8
void
HaierTundraButton::dump_config
() { LOG_BUTTON(
""
,
"Haier Tundra Button"
,
this
); }
9
10
void
HaierTundraButton::press_action
() {
11
if
(this->
kind_
==
ButtonKind::BUTTON_KIND_LIGHT
) {
12
this->
parent_
->toggle_light();
13
}
else
{
14
this->
parent_
->start_self_clean();
15
}
16
}
17
18
}
// namespace esphome::haier_tundra
esphome::Parented< HaierTundra >::parent_
HaierTundra * parent_
Definition
helpers.h:2008
esphome::haier_tundra::HaierTundraButton::dump_config
void dump_config() override
Definition
haier_tundra_button.cpp:8
esphome::haier_tundra::HaierTundraButton::kind_
ButtonKind kind_
Definition
haier_tundra_button.h:22
esphome::haier_tundra::HaierTundraButton::press_action
void press_action() override
Definition
haier_tundra_button.cpp:10
haier_tundra_button.h
log.h
esphome::haier_tundra
Definition
haier_tundra_button.cpp:4
esphome::haier_tundra::ESPHOME_LOG_TAG
ESPHOME_LOG_TAG(TAG, "haier_tundra.button")
esphome::haier_tundra::ButtonKind::BUTTON_KIND_LIGHT
@ BUTTON_KIND_LIGHT
Generated by
1.12.0