ESPHome
2026.11.0-dev
Loading...
Searching...
No Matches
esphome
components
homeassistant
button
homeassistant_button.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/components/button/button.h
"
4
#include "
esphome/core/component.h
"
5
6
namespace
esphome::homeassistant
{
7
8
class
HomeassistantButton
final :
public
button::Button
,
public
Component
{
9
public
:
10
void
set_entity_id
(
const
char
*entity_id) { this->
entity_id_
= entity_id; }
11
12
void
dump_config
()
override
;
13
float
get_setup_priority
()
const override
;
14
15
protected
:
16
void
press_action
()
override
;
17
18
const
char
*
entity_id_
{
nullptr
};
19
};
20
21
}
// namespace esphome::homeassistant
button.h
esphome::Component
Definition
component.h:147
esphome::button::Button
Base class for all buttons.
Definition
button.h:25
esphome::homeassistant::HomeassistantButton
Definition
homeassistant_button.h:8
esphome::homeassistant::HomeassistantButton::dump_config
void dump_config() override
Definition
homeassistant_button.cpp:15
esphome::homeassistant::HomeassistantButton::set_entity_id
void set_entity_id(const char *entity_id)
Definition
homeassistant_button.h:10
esphome::homeassistant::HomeassistantButton::get_setup_priority
float get_setup_priority() const override
Definition
homeassistant_button.cpp:20
esphome::homeassistant::HomeassistantButton::press_action
void press_action() override
Definition
homeassistant_button.cpp:22
esphome::homeassistant::HomeassistantButton::entity_id_
const char * entity_id_
Definition
homeassistant_button.h:18
component.h
esphome::homeassistant
Definition
homeassistant_binary_sensor.cpp:6
Generated by
1.12.0