ESPHome
2025.5.0
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
std::string &entity_id) {
entity_id_
= entity_id; }
12
void
set_attribute
(
const
std::string &attribute) {
attribute_
= attribute; }
13
void
setup
()
override
;
14
void
dump_config
()
override
;
15
float
get_setup_priority
()
const override
;
16
17
protected
:
18
std::string
entity_id_
;
19
optional<std::string>
attribute_
;
20
bool
initial_
{
true
};
21
};
22
23
}
// namespace homeassistant
24
}
// namespace esphome
binary_sensor.h
esphome::Component
Definition
component.h:70
esphome::binary_sensor::BinarySensor
Base class for all binary_sensor-type classes.
Definition
binary_sensor.h:37
esphome::homeassistant::HomeassistantBinarySensor
Definition
homeassistant_binary_sensor.h:9
esphome::homeassistant::HomeassistantBinarySensor::initial_
bool initial_
Definition
homeassistant_binary_sensor.h:20
esphome::homeassistant::HomeassistantBinarySensor::set_entity_id
void set_entity_id(const std::string &entity_id)
Definition
homeassistant_binary_sensor.h:11
esphome::homeassistant::HomeassistantBinarySensor::entity_id_
std::string entity_id_
Definition
homeassistant_binary_sensor.h:18
esphome::homeassistant::HomeassistantBinarySensor::dump_config
void dump_config() override
Definition
homeassistant_binary_sensor.cpp:38
esphome::homeassistant::HomeassistantBinarySensor::setup
void setup() override
Definition
homeassistant_binary_sensor.cpp:10
esphome::homeassistant::HomeassistantBinarySensor::set_attribute
void set_attribute(const std::string &attribute)
Definition
homeassistant_binary_sensor.h:12
esphome::homeassistant::HomeassistantBinarySensor::attribute_
optional< std::string > attribute_
Definition
homeassistant_binary_sensor.h:19
esphome::homeassistant::HomeassistantBinarySensor::get_setup_priority
float get_setup_priority() const override
Definition
homeassistant_binary_sensor.cpp:45
esphome::optional
Definition
optional.h:36
component.h
esphome
Providing packet encoding functions for exchanging data with a remote host.
Definition
a01nyub.cpp:7
Generated by
1.12.0