esphome-api-client 0.5.0
Modern C++17 client for the ESPHome native API (plaintext + Noise)
Loading...
Searching...
No Matches
text_sensor.hpp
Go to the documentation of this file.
1#pragma once
2
5
8
9#include <cstdint>
10#include <string>
11
12namespace esphome::api {
13
14namespace proto {
15class ListEntitiesTextSensorResponse;
16class TextSensorStateResponse;
17} // namespace proto
18
21 std::string device_class;
22};
23
26 std::uint32_t key = 0;
27 std::string state;
29 bool missing_state = false;
30};
31
32TextSensorInfo parse_text_sensor_info(const proto::ListEntitiesTextSensorResponse& msg);
33TextSensorState parse_text_sensor_state(const proto::TextSensorStateResponse& msg);
34
35} // namespace esphome::api
Common entity metadata shared by every entity domain.
Typed mirrors of the ESPHome protobuf enums.
Definition bytes.hpp:10
TextSensorState parse_text_sensor_state(const proto::TextSensorStateResponse &msg)
TextSensorInfo parse_text_sensor_info(const proto::ListEntitiesTextSensorResponse &msg)
Fields present on every ListEntities*Response.
Definition entity.hpp:16
Static description of a text sensor entity.
Definition text_sensor.hpp:20
std::string device_class
Definition text_sensor.hpp:21
A text sensor's reported value.
Definition text_sensor.hpp:25
std::uint32_t key
Definition text_sensor.hpp:26
std::string state
Definition text_sensor.hpp:27
bool missing_state
True when the text sensor currently has no valid value.
Definition text_sensor.hpp:29