esphome-api-client 0.5.0
Modern C++17 client for the ESPHome native API (plaintext + Noise)
Loading...
Searching...
No Matches
binary_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 ListEntitiesBinarySensorResponse;
16class BinarySensorStateResponse;
17} // namespace proto
18
21 std::string device_class;
23};
24
27 std::uint32_t key = 0;
28 bool state = false;
30 bool missing_state = false;
31};
32
33BinarySensorInfo parse_binary_sensor_info(const proto::ListEntitiesBinarySensorResponse& msg);
34BinarySensorState parse_binary_sensor_state(const proto::BinarySensorStateResponse& msg);
35
36} // namespace esphome::api
Common entity metadata shared by every entity domain.
Typed mirrors of the ESPHome protobuf enums.
Definition bytes.hpp:10
BinarySensorInfo parse_binary_sensor_info(const proto::ListEntitiesBinarySensorResponse &msg)
BinarySensorState parse_binary_sensor_state(const proto::BinarySensorStateResponse &msg)
Static description of a binary sensor entity.
Definition binary_sensor.hpp:20
bool is_status_binary_sensor
Definition binary_sensor.hpp:22
std::string device_class
Definition binary_sensor.hpp:21
A binary sensor's reported value.
Definition binary_sensor.hpp:26
bool missing_state
True when the binary sensor currently has no valid value.
Definition binary_sensor.hpp:30
std::uint32_t key
Definition binary_sensor.hpp:27
bool state
Definition binary_sensor.hpp:28
Fields present on every ListEntities*Response.
Definition entity.hpp:16