ESPHome
2026.9.0-dev
Loading...
Searching...
No Matches
esphome
components
hoermann_hcp
button
hoermann_hcp_button.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/components/button/button.h
"
4
#include "
../hoermann_hcp.h
"
5
6
namespace
esphome::hoermann_hcp
{
7
8
// The door commands the cover has no equivalent for. A refused command is already reported by the hub and
9
// leaves nothing to correct here, because a button carries no state of its own.
10
class
HoermannHcpButton
:
public
button::Button
{
11
public
:
12
explicit
HoermannHcpButton
(
HoermannHcp
*parent) :
parent_
(parent) {}
13
14
protected
:
15
HoermannHcp
*
const
parent_
;
16
};
17
18
class
HoermannHcpVentButton
final :
public
HoermannHcpButton
{
19
public
:
20
using
HoermannHcpButton::HoermannHcpButton
;
21
22
protected
:
23
void
press_action
()
override
{ this->
parent_
->
vent_door
(); }
24
};
25
26
class
HoermannHcpHalfOpenButton
final :
public
HoermannHcpButton
{
27
public
:
28
using
HoermannHcpButton::HoermannHcpButton
;
29
30
protected
:
31
void
press_action
()
override
{ this->
parent_
->
half_open_door
(); }
32
};
33
34
}
// namespace esphome::hoermann_hcp
button.h
esphome::button::Button
Base class for all buttons.
Definition
button.h:25
esphome::hoermann_hcp::HoermannHcpButton
Definition
hoermann_hcp_button.h:10
esphome::hoermann_hcp::HoermannHcpButton::parent_
HoermannHcp *const parent_
Definition
hoermann_hcp_button.h:15
esphome::hoermann_hcp::HoermannHcpButton::HoermannHcpButton
HoermannHcpButton(HoermannHcp *parent)
Definition
hoermann_hcp_button.h:12
esphome::hoermann_hcp::HoermannHcpHalfOpenButton
Definition
hoermann_hcp_button.h:26
esphome::hoermann_hcp::HoermannHcpHalfOpenButton::press_action
void press_action() override
Definition
hoermann_hcp_button.h:31
esphome::hoermann_hcp::HoermannHcp
Definition
hoermann_hcp.h:37
esphome::hoermann_hcp::HoermannHcp::vent_door
bool vent_door()
Definition
hoermann_hcp.cpp:293
esphome::hoermann_hcp::HoermannHcp::half_open_door
bool half_open_door()
Definition
hoermann_hcp.cpp:294
esphome::hoermann_hcp::HoermannHcpVentButton
Definition
hoermann_hcp_button.h:18
esphome::hoermann_hcp::HoermannHcpVentButton::press_action
void press_action() override
Definition
hoermann_hcp_button.h:23
hoermann_hcp.h
esphome::hoermann_hcp
Definition
hoermann_hcp_binary_sensor.cpp:5
Generated by
1.12.0