ESPHome 2025.6.0
Loading...
Searching...
No Matches
update_entity.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome {
8namespace update {
9
10struct UpdateInfo {
11 std::string latest_version;
12 std::string current_version;
13 std::string title;
14 std::string summary;
15 std::string release_url;
16 std::string firmware_url;
17 std::string md5;
18 bool has_progress{false};
19 float progress;
20};
21
28
30 public:
31 void publish_state();
32
33 void perform() { this->perform(false); }
34 virtual void perform(bool force) = 0;
35 virtual void check() = 0;
36
39
40 void add_on_state_callback(std::function<void()> &&callback) { this->state_callback_.add(std::move(callback)); }
41
42 protected:
45
47};
48
49} // namespace update
50} // namespace esphome
const UpdateState & state
CallbackManager< void()> state_callback_
virtual void perform(bool force)=0
void add_on_state_callback(std::function< void()> &&callback)
const UpdateInfo & update_info
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7