diff --git a/Integrations/ESPHome/Battery.yaml b/Integrations/ESPHome/Battery.yaml index fab4750..9e77255 100644 --- a/Integrations/ESPHome/Battery.yaml +++ b/Integrations/ESPHome/Battery.yaml @@ -62,4 +62,3 @@ script: - component.update: sys_uptime - component.update: soil_adc - component.update: max_17048 - - component.update: apollo_firmware_version diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 9261fb7..28de2f9 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -382,8 +382,6 @@ text_sensor: - platform: template name: "Apollo Firmware Version" id: apollo_firmware_version - lambda: |- - return {"${version}"}; update_interval: never entity_category: "diagnostic" diff --git a/Integrations/ESPHome/NonBattery.yaml b/Integrations/ESPHome/NonBattery.yaml index aca1050..336340a 100644 --- a/Integrations/ESPHome/NonBattery.yaml +++ b/Integrations/ESPHome/NonBattery.yaml @@ -34,4 +34,3 @@ script: - component.update: sys_esp_temperature - component.update: sys_uptime - component.update: soil_adc - - component.update: apollo_firmware_version diff --git a/Integrations/ESPHome/PLT-1.yaml b/Integrations/ESPHome/PLT-1.yaml index 5c7c7d0..d51991a 100644 --- a/Integrations/ESPHome/PLT-1.yaml +++ b/Integrations/ESPHome/PLT-1.yaml @@ -22,7 +22,12 @@ esphome: then: - lambda: |- ESP_LOGW("Apollo", "Preventing Deep Sleep Due To OTA On Boot"); - id(deep_sleep_1).prevent_deep_sleep(); + id(deep_sleep_1).prevent_deep_sleep(); + - priority: 500 + then: + - text_sensor.template.publish: + id: apollo_firmware_version + state: "${version}" - priority: -10 then: - if: diff --git a/Integrations/ESPHome/PLT-1B.yaml b/Integrations/ESPHome/PLT-1B.yaml index 0348aca..8fb77d4 100644 --- a/Integrations/ESPHome/PLT-1B.yaml +++ b/Integrations/ESPHome/PLT-1B.yaml @@ -23,6 +23,11 @@ esphome: - lambda: |- ESP_LOGW("Apollo", "Preventing Deep Sleep Due To OTA On Boot"); id(deep_sleep_1).prevent_deep_sleep(); + - priority: 500 + then: + - text_sensor.template.publish: + id: apollo_firmware_version + state: "${version}" - priority: -10 then: - if: diff --git a/Integrations/ESPHome/PLT-1B_BLE.yaml b/Integrations/ESPHome/PLT-1B_BLE.yaml index 34b0ca9..7c4524a 100644 --- a/Integrations/ESPHome/PLT-1B_BLE.yaml +++ b/Integrations/ESPHome/PLT-1B_BLE.yaml @@ -11,6 +11,9 @@ esphome: on_boot: priority: 500 then: + - text_sensor.template.publish: + id: apollo_firmware_version + state: "${version}" - lambda: |- id(deep_sleep_1).set_sleep_duration(id(deep_sleep_sleep_duration).state * 60 * 60 * 1000); id(deep_sleep_1).set_run_duration(90 * 1000); diff --git a/Integrations/ESPHome/PLT-1B_Minimal.yaml b/Integrations/ESPHome/PLT-1B_Minimal.yaml index a3ee48d..bad38b3 100644 --- a/Integrations/ESPHome/PLT-1B_Minimal.yaml +++ b/Integrations/ESPHome/PLT-1B_Minimal.yaml @@ -23,6 +23,11 @@ esphome: - lambda: |- ESP_LOGW("Apollo", "Preventing Deep Sleep Due To OTA On Boot"); id(deep_sleep_1).prevent_deep_sleep(); + - priority: 500 + then: + - text_sensor.template.publish: + id: apollo_firmware_version + state: "${version}" - priority: -10 then: - if: diff --git a/Integrations/ESPHome/PLT-1_BLE.yaml b/Integrations/ESPHome/PLT-1_BLE.yaml index 460ceec..62c32fb 100644 --- a/Integrations/ESPHome/PLT-1_BLE.yaml +++ b/Integrations/ESPHome/PLT-1_BLE.yaml @@ -11,6 +11,9 @@ esphome: on_boot: priority: 500 then: + - text_sensor.template.publish: + id: apollo_firmware_version + state: "${version}" - lambda: |- id(deep_sleep_1).set_sleep_duration(id(deep_sleep_sleep_duration).state * 60 * 1000); id(deep_sleep_1).set_run_duration(90 * 1000); diff --git a/Integrations/ESPHome/PLT-1_Minimal.yaml b/Integrations/ESPHome/PLT-1_Minimal.yaml index 9e7555d..9c7d70a 100644 --- a/Integrations/ESPHome/PLT-1_Minimal.yaml +++ b/Integrations/ESPHome/PLT-1_Minimal.yaml @@ -23,6 +23,11 @@ esphome: - lambda: |- ESP_LOGW("Apollo", "Preventing Deep Sleep Due To OTA On Boot"); id(deep_sleep_1).prevent_deep_sleep(); + - priority: 500 + then: + - text_sensor.template.publish: + id: apollo_firmware_version + state: "${version}" - priority: -10 then: - if: