1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-18 03:02:20 +01:00

[update] Implement `update.perform action and update.is_available` condition (#7165)

* [update] Fix unimplemented yaml action/condition

* Add/update tests

---------

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
This commit is contained in:
Jesse Hills
2024-07-31 16:08:11 +12:00
committed by GitHub
parent dd3dd7a136
commit 8849443bf6
9 changed files with 98 additions and 19 deletions

View File

@@ -32,7 +32,9 @@ class UpdateEntity : public EntityBase, public EntityBase_DeviceClass {
void publish_state();
virtual void perform() = 0;
void perform() { this->perform(false); }
virtual void perform(bool force) = 0;
const UpdateInfo &update_info = update_info_;
const UpdateState &state = state_;