From f721a72b477b357670aef1bfd009c17d4ec4b748 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 23 Jun 2024 09:38:23 -0500 Subject: [PATCH] OTA: Moving to base.yamls and adding ESPHome platform (#293) Co-authored-by: Flavio Fernandes --- base.yaml | 5 +++++ base_drycontact.yaml | 5 +++++ base_secplusv1.yaml | 5 +++++ static/v25board_esp32_d1_mini.yaml | 2 -- static/v25board_esp32_d1_mini_secplusv1.yaml | 2 -- static/v25board_esp8266_d1_mini.yaml | 2 -- static/v25board_esp8266_d1_mini_lite.yaml | 2 -- static/v25board_esp8266_d1_mini_lite_secplusv1.yaml | 2 -- static/v25board_esp8266_d1_mini_secplusv1.yaml | 2 -- static/v25iboard.yaml | 2 -- static/v25iboard_drycontact.yaml | 2 -- static/v25iboard_secplusv1.yaml | 2 -- static/v2board_esp32_d1_mini.yaml | 2 -- static/v2board_esp32_lolin_s2_mini.yaml | 2 -- static/v2board_esp8266_d1_mini.yaml | 2 -- static/v2board_esp8266_d1_mini_lite.yaml | 2 -- 16 files changed, 15 insertions(+), 26 deletions(-) diff --git a/base.yaml b/base.yaml index ddf6272..179ba42 100644 --- a/base.yaml +++ b/base.yaml @@ -6,6 +6,8 @@ external_components: url: https://github.com/ratgdo/esphome-ratgdo refresh: 1s +safe_mode: + preferences: flash_write_interval: 1min @@ -45,6 +47,9 @@ api: id($id_prefix).clear_paired_devices(ratgdo::PairedDevice::ACCESSORY); } +ota: + - platform: esphome + sensor: - platform: ratgdo id: ${id_prefix}_openings diff --git a/base_drycontact.yaml b/base_drycontact.yaml index eefa8fc..79783d3 100644 --- a/base_drycontact.yaml +++ b/base_drycontact.yaml @@ -8,6 +8,8 @@ external_components: url: https://github.com/ratgdo/esphome-ratgdo refresh: 1s +safe_mode: + preferences: flash_write_interval: 1min @@ -25,6 +27,9 @@ ratgdo: discrete_close_pin: ${discrete_close_pin} protocol: drycontact +ota: + - platform: esphome + binary_sensor: - platform: ratgdo type: obstruction diff --git a/base_secplusv1.yaml b/base_secplusv1.yaml index 867b542..68a76b3 100644 --- a/base_secplusv1.yaml +++ b/base_secplusv1.yaml @@ -6,6 +6,8 @@ external_components: url: https://github.com/ratgdo/esphome-ratgdo refresh: 1s +safe_mode: + preferences: flash_write_interval: 1min @@ -28,6 +30,9 @@ ratgdo: message: "Failed to communicate with garage opener on startup." notification_id: "esphome_ratgdo_${id_prefix}_sync_failed" +ota: + - platform: esphome + lock: - platform: ratgdo id: ${id_prefix}_lock_remotes diff --git a/static/v25board_esp32_d1_mini.yaml b/static/v25board_esp32_d1_mini.yaml index 4a07136..a31833c 100644 --- a/static/v25board_esp32_d1_mini.yaml +++ b/static/v25board_esp32_d1_mini.yaml @@ -41,8 +41,6 @@ time: api: id: api_server -ota: - improv_serial: wifi: diff --git a/static/v25board_esp32_d1_mini_secplusv1.yaml b/static/v25board_esp32_d1_mini_secplusv1.yaml index e4a2e9f..66e11c6 100644 --- a/static/v25board_esp32_d1_mini_secplusv1.yaml +++ b/static/v25board_esp32_d1_mini_secplusv1.yaml @@ -41,8 +41,6 @@ time: api: id: api_server -ota: - improv_serial: wifi: diff --git a/static/v25board_esp8266_d1_mini.yaml b/static/v25board_esp8266_d1_mini.yaml index 83f6710..0d0131b 100644 --- a/static/v25board_esp8266_d1_mini.yaml +++ b/static/v25board_esp8266_d1_mini.yaml @@ -42,8 +42,6 @@ time: api: id: api_server -ota: - improv_serial: wifi: diff --git a/static/v25board_esp8266_d1_mini_lite.yaml b/static/v25board_esp8266_d1_mini_lite.yaml index cbd70bf..b4b94ae 100644 --- a/static/v25board_esp8266_d1_mini_lite.yaml +++ b/static/v25board_esp8266_d1_mini_lite.yaml @@ -42,8 +42,6 @@ time: api: id: api_server -ota: - improv_serial: wifi: diff --git a/static/v25board_esp8266_d1_mini_lite_secplusv1.yaml b/static/v25board_esp8266_d1_mini_lite_secplusv1.yaml index 54da983..0b78cd9 100644 --- a/static/v25board_esp8266_d1_mini_lite_secplusv1.yaml +++ b/static/v25board_esp8266_d1_mini_lite_secplusv1.yaml @@ -42,8 +42,6 @@ time: api: id: api_server -ota: - improv_serial: wifi: diff --git a/static/v25board_esp8266_d1_mini_secplusv1.yaml b/static/v25board_esp8266_d1_mini_secplusv1.yaml index 7efcbe8..f8029b0 100644 --- a/static/v25board_esp8266_d1_mini_secplusv1.yaml +++ b/static/v25board_esp8266_d1_mini_secplusv1.yaml @@ -42,8 +42,6 @@ time: api: id: api_server -ota: - improv_serial: wifi: diff --git a/static/v25iboard.yaml b/static/v25iboard.yaml index db1c11c..98bb6b8 100644 --- a/static/v25iboard.yaml +++ b/static/v25iboard.yaml @@ -42,8 +42,6 @@ time: api: id: api_server -ota: - improv_serial: wifi: diff --git a/static/v25iboard_drycontact.yaml b/static/v25iboard_drycontact.yaml index bbf1eca..431456b 100644 --- a/static/v25iboard_drycontact.yaml +++ b/static/v25iboard_drycontact.yaml @@ -42,8 +42,6 @@ time: api: id: api_server -ota: - improv_serial: wifi: diff --git a/static/v25iboard_secplusv1.yaml b/static/v25iboard_secplusv1.yaml index c099aea..7d1c72a 100644 --- a/static/v25iboard_secplusv1.yaml +++ b/static/v25iboard_secplusv1.yaml @@ -42,8 +42,6 @@ time: api: id: api_server -ota: - improv_serial: wifi: diff --git a/static/v2board_esp32_d1_mini.yaml b/static/v2board_esp32_d1_mini.yaml index d615309..d926559 100644 --- a/static/v2board_esp32_d1_mini.yaml +++ b/static/v2board_esp32_d1_mini.yaml @@ -41,8 +41,6 @@ time: api: id: api_server -ota: - improv_serial: wifi: diff --git a/static/v2board_esp32_lolin_s2_mini.yaml b/static/v2board_esp32_lolin_s2_mini.yaml index 6dca833..6570c16 100644 --- a/static/v2board_esp32_lolin_s2_mini.yaml +++ b/static/v2board_esp32_lolin_s2_mini.yaml @@ -41,8 +41,6 @@ time: api: id: api_server -ota: - improv_serial: wifi: diff --git a/static/v2board_esp8266_d1_mini.yaml b/static/v2board_esp8266_d1_mini.yaml index ac1b537..954c8fe 100644 --- a/static/v2board_esp8266_d1_mini.yaml +++ b/static/v2board_esp8266_d1_mini.yaml @@ -42,8 +42,6 @@ time: api: id: api_server -ota: - improv_serial: wifi: diff --git a/static/v2board_esp8266_d1_mini_lite.yaml b/static/v2board_esp8266_d1_mini_lite.yaml index 75f0c12..d2b85c0 100644 --- a/static/v2board_esp8266_d1_mini_lite.yaml +++ b/static/v2board_esp8266_d1_mini_lite.yaml @@ -42,8 +42,6 @@ time: api: id: api_server -ota: - improv_serial: wifi: