From 070f3c6e7b5f7f812c07c8de753c4983274f356c Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Thu, 31 Oct 2024 15:58:46 -0400 Subject: [PATCH] Update Automated Test --- Integrations/ESPHome/Core.yaml | 3 ++- Integrations/ESPHome/PLT-1B.yaml | 37 +++++++++++++++++++------------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index d9d990d..c502f9c 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -1,6 +1,6 @@ substitutions: name: apollo-plt-1 - version: "24.10.25.1" + version: "24.10.31.1" device_description: ${name} made by Apollo Automation - version ${version}. esp32: @@ -168,6 +168,7 @@ binary_sensor: id(runTest) = true; id(deep_sleep_run_duration).publish_state(60); id(deep_sleep_sleep_duration).publish_state(60); + id(prevent_sleep).turn_on(); id(factory_reset_switch).turn_on(); } else if (millis() - id(button_press_timestamp) >= 3000) { diff --git a/Integrations/ESPHome/PLT-1B.yaml b/Integrations/ESPHome/PLT-1B.yaml index 194c816..709d1d6 100644 --- a/Integrations/ESPHome/PLT-1B.yaml +++ b/Integrations/ESPHome/PLT-1B.yaml @@ -12,22 +12,29 @@ esphome: min_version: 2024.2.0 on_boot: - priority: 999.0 - then: - - switch.turn_on: accessory_power + - priority: 999.0 + then: + - switch.turn_on: accessory_power - - lambda: |- - id(deep_sleep_1).set_run_duration(id(deep_sleep_run_duration).state * 1000); - id(deep_sleep_1).set_sleep_duration(id(deep_sleep_sleep_duration).state * 60 * 60 * 1000); - - if: - condition: - or: - - binary_sensor.is_on: ota_mode - - switch.is_on: prevent_sleep - then: - - lambda: |- - ESP_LOGW("Apollo", "Preventing Deep Sleep Due To OTA On Boot"); - id(deep_sleep_1).prevent_deep_sleep(); + - lambda: |- + id(deep_sleep_1).set_run_duration(id(deep_sleep_run_duration).state * 1000); + id(deep_sleep_1).set_sleep_duration(id(deep_sleep_sleep_duration).state * 60 * 60 * 1000); + - if: + condition: + or: + - binary_sensor.is_on: ota_mode + - switch.is_on: prevent_sleep + then: + - lambda: |- + ESP_LOGW("Apollo", "Preventing Deep Sleep Due To OTA On Boot"); + id(deep_sleep_1).prevent_deep_sleep(); + - priority: -10 + then: + - if: + condition: + - lambda: "return id(runTest);" + then: + - lambda: "id(testScript).execute();" on_shutdown: - light.turn_off: rgb_light