ESPHome
2025.12.3
Loading...
Searching...
No Matches
esphome
components
homeassistant
binary_sensor
homeassistant_binary_sensor.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/components/binary_sensor/binary_sensor.h
"
5
6
namespace
esphome
{
7
namespace
homeassistant {
8
9
class
HomeassistantBinarySensor
:
public
binary_sensor::BinarySensor
,
public
Component
{
10
public
:
11
void
set_entity_id
(
const
char
*entity_id) { this->
entity_id_
= entity_id; }
12
void
set_attribute
(
const
char
*attribute) { this->
attribute_
= attribute; }
13
void
setup
()
override
;
14
void
dump_config
()
override
;
15
float
get_setup_priority
()
const override
;
16
17
protected
:
18
const
char
*
entity_id_
{
nullptr
};
19
const
char
*
attribute_
{
nullptr
};
20
bool
initial_
{
true
};
21
};
22
23
}
// namespace homeassistant
24
}
// namespace esphome
binary_sensor.h
esphome::Component
Definition
component.h:75
esphome::binary_sensor::BinarySensor
Base class for all binary_sensor-type classes.
Definition
binary_sensor.h:31
esphome::homeassistant::HomeassistantBinarySensor
Definition
homeassistant_binary_sensor.h:9
esphome::homeassistant::HomeassistantBinarySensor::initial_
bool initial_
Definition
homeassistant_binary_sensor.h:20
esphome::homeassistant::HomeassistantBinarySensor::attribute_
const char * attribute_
Definition
homeassistant_binary_sensor.h:19
esphome::homeassistant::HomeassistantBinarySensor::set_attribute
void set_attribute(const char *attribute)
Definition
homeassistant_binary_sensor.h:12
esphome::homeassistant::HomeassistantBinarySensor::dump_config
void dump_config() override
Definition
homeassistant_binary_sensor.cpp:37
esphome::homeassistant::HomeassistantBinarySensor::setup
void setup() override
Definition
homeassistant_binary_sensor.cpp:10
esphome::homeassistant::HomeassistantBinarySensor::entity_id_
const char * entity_id_
Definition
homeassistant_binary_sensor.h:18
esphome::homeassistant::HomeassistantBinarySensor::get_setup_priority
float get_setup_priority() const override
Definition
homeassistant_binary_sensor.cpp:44
esphome::homeassistant::HomeassistantBinarySensor::set_entity_id
void set_entity_id(const char *entity_id)
Definition
homeassistant_binary_sensor.h:11
component.h
esphome
Providing packet encoding functions for exchanging data with a remote host.
Definition
a01nyub.cpp:7
Generated by
1.12.0