ESPHome
2025.12.1
Loading...
Searching...
No Matches
esphome
components
homeassistant
text_sensor
homeassistant_text_sensor.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/components/text_sensor/text_sensor.h
"
5
6
namespace
esphome
{
7
namespace
homeassistant {
8
9
class
HomeassistantTextSensor
:
public
text_sensor::TextSensor
,
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
};
21
22
}
// namespace homeassistant
23
}
// namespace esphome
esphome::Component
Definition
component.h:75
esphome::homeassistant::HomeassistantTextSensor
Definition
homeassistant_text_sensor.h:9
esphome::homeassistant::HomeassistantTextSensor::attribute_
const char * attribute_
Definition
homeassistant_text_sensor.h:19
esphome::homeassistant::HomeassistantTextSensor::setup
void setup() override
Definition
homeassistant_text_sensor.cpp:10
esphome::homeassistant::HomeassistantTextSensor::set_entity_id
void set_entity_id(const char *entity_id)
Definition
homeassistant_text_sensor.h:11
esphome::homeassistant::HomeassistantTextSensor::dump_config
void dump_config() override
Definition
homeassistant_text_sensor.cpp:21
esphome::homeassistant::HomeassistantTextSensor::get_setup_priority
float get_setup_priority() const override
Definition
homeassistant_text_sensor.cpp:28
esphome::homeassistant::HomeassistantTextSensor::entity_id_
const char * entity_id_
Definition
homeassistant_text_sensor.h:18
esphome::homeassistant::HomeassistantTextSensor::set_attribute
void set_attribute(const char *attribute)
Definition
homeassistant_text_sensor.h:12
esphome::text_sensor::TextSensor
Definition
text_sensor.h:25
component.h
esphome
Providing packet encoding functions for exchanging data with a remote host.
Definition
a01nyub.cpp:7
text_sensor.h
Generated by
1.12.0