esphome-api-client 0.5.0
Modern C++17 client for the ESPHome native API (plaintext + Noise)
Loading...
Searching...
No Matches
update.hpp
Go to the documentation of this file.
1#pragma once
2
5
9
10#include <cstdint>
11#include <memory>
12#include <string>
13
14namespace esphome::api {
15
16namespace proto {
17class ListEntitiesUpdateResponse;
18class UpdateStateResponse;
19class UpdateCommandRequest;
20} // namespace proto
21
24 std::string device_class;
25};
26
29 std::uint32_t key = 0;
31 bool missing_state = false;
32 bool in_progress = false;
33 bool has_progress = false;
34 float progress = 0.0F;
35 std::string current_version;
36 std::string latest_version;
37 std::string title;
38 std::string release_summary;
39 std::string release_url;
40};
41
48
49UpdateInfo parse_update_info(const proto::ListEntitiesUpdateResponse& msg);
50UpdateState parse_update_state(const proto::UpdateStateResponse& msg);
51std::unique_ptr<ProtoMessage> to_message(const UpdateControl& cmd);
52
53} // namespace esphome::api
Common entity metadata shared by every entity domain.
Typed mirrors of the ESPHome protobuf enums.
Definition bytes.hpp:10
std::unique_ptr< ProtoMessage > to_message(const AlarmControlPanelCommand &cmd)
UpdateCommand
Mirror of proto enum UpdateCommand.
Definition enums.hpp:377
UpdateInfo parse_update_info(const proto::ListEntitiesUpdateResponse &msg)
UpdateState parse_update_state(const proto::UpdateStateResponse &msg)
Lightweight base class for every generated ESPHome API message.
Fields present on every ListEntities*Response.
Definition entity.hpp:16
A command to control an update entity.
Definition update.hpp:44
UpdateCommand command
Definition update.hpp:46
std::uint32_t key
Definition update.hpp:45
Static description of an update entity.
Definition update.hpp:23
std::string device_class
Definition update.hpp:24
An update's reported value.
Definition update.hpp:28
std::string title
Definition update.hpp:37
std::string latest_version
Definition update.hpp:36
std::string current_version
Definition update.hpp:35
bool has_progress
Definition update.hpp:33
bool missing_state
True when the update currently has no valid value.
Definition update.hpp:31
std::string release_summary
Definition update.hpp:38
float progress
Definition update.hpp:34
std::uint32_t key
Definition update.hpp:29
std::string release_url
Definition update.hpp:39
bool in_progress
Definition update.hpp:32