ESPHome
2026.3.0
Loading...
Searching...
No Matches
esphome
components
micronova
text_sensor
micronova_text_sensor.cpp
Go to the documentation of this file.
1
#include "
micronova_text_sensor.h
"
2
3
namespace
esphome::micronova
{
4
5
static
const
char
*
const
TAG =
"micronova.text_sensor"
;
6
7
void
MicroNovaTextSensor::dump_config
() {
8
LOG_TEXT_SENSOR(
""
,
"Micronova text sensor"
,
this
);
9
this->
dump_base_config
();
10
}
11
12
void
MicroNovaTextSensor::process_value_from_stove
(
int
value_from_stove) {
13
if
(value_from_stove == -1) {
14
this->
publish_state
(
"unknown"
);
15
return
;
16
}
17
18
this->
publish_state
(STOVE_STATES[value_from_stove]);
19
}
20
21
}
// namespace esphome::micronova
esphome::micronova::MicroNovaListener::dump_base_config
void dump_base_config()
Definition
micronova.cpp:20
esphome::micronova::MicroNovaTextSensor::dump_config
void dump_config() override
Definition
micronova_text_sensor.cpp:7
esphome::micronova::MicroNovaTextSensor::process_value_from_stove
void process_value_from_stove(int value_from_stove) override
Definition
micronova_text_sensor.cpp:12
esphome::text_sensor::TextSensor::publish_state
void publish_state(const std::string &state)
Definition
text_sensor.cpp:21
micronova_text_sensor.h
esphome::micronova
Definition
micronova_button.cpp:3
Generated by
1.12.0