esphome-api-client 0.5.0
Modern C++17 client for the ESPHome native API (plaintext + Noise)
Loading...
Searching...
No Matches
event.hpp
Go to the documentation of this file.
1#pragma once
2
5
8
9#include <cstdint>
10#include <string>
11#include <vector>
12
13namespace esphome::api {
14
15namespace proto {
16class ListEntitiesEventResponse;
17class EventResponse;
18} // namespace proto
19
22 std::string device_class;
23 std::vector<std::string> event_types;
24};
25
27struct EventState {
28 std::uint32_t key = 0;
29 std::string event_type;
30};
31
32EventInfo parse_event_info(const proto::ListEntitiesEventResponse& msg);
33EventState parse_event_state(const proto::EventResponse& 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
EventInfo parse_event_info(const proto::ListEntitiesEventResponse &msg)
EventState parse_event_state(const proto::EventResponse &msg)
Fields present on every ListEntities*Response.
Definition entity.hpp:16
Static description of an event entity.
Definition event.hpp:21
std::vector< std::string > event_types
Definition event.hpp:23
std::string device_class
Definition event.hpp:22
An event's reported value.
Definition event.hpp:27
std::uint32_t key
Definition event.hpp:28
std::string event_type
Definition event.hpp:29