1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 03:12: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

@@ -1 +1,28 @@
substitutions:
verify_ssl: "true"
esphome:
on_boot:
then:
- if:
condition:
update.is_available:
then:
- logger.log: "Update available"
- update.perform:
force_update: true
wifi:
ssid: MySSID
password: password1
http_request:
verify_ssl: ${verify_ssl}
ota:
- platform: http_request
update:
- platform: http_request
name: Firmware Update
source: http://example.com/manifest.json

View File

@@ -1 +1,4 @@
substitutions:
verify_ssl: "false"
<<: !include common.yaml

View File

@@ -1 +1,4 @@
substitutions:
verify_ssl: "false"
<<: !include common.yaml

View File

@@ -1 +1,4 @@
substitutions:
verify_ssl: "false"
<<: !include common.yaml