From 55b4bf0186cc8dbe28291c8c064c0ce181d95e47 Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Thu, 12 Dec 2024 01:01:12 -0500 Subject: [PATCH 01/33] Add In Food Probe --- Integrations/ESPHome/Core.yaml | 51 ++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 8919f34..4b1d42a 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -57,6 +57,25 @@ output: rtttl: output: buzzer +select: + - platform: template + name: "Temp Probe select" + optimistic: true + restore_value: true + initial_option: Dallas + id: temp_probe_select + set_action: + - if: + condition: + lambda: 'return x == "Dallas";' + then: + - switch.turn_on: sensor_selector + else: + - switch.turn_off: sensor_selector + options: + - Dallas + - Food + binary_sensor: - platform: status name: Online @@ -85,6 +104,31 @@ sensor: update_interval: 5s id: temp_probe + - platform: ntc + id: ntc_sensor + name: Food Probe + sensor: resistance_sensor + calibration: + b_constant: 3950 + reference_temperature: 25°C + reference_resistance: 100kOhm + + - platform: resistance + id: resistance_sensor + sensor: source_sensor + configuration: UPSTREAM + reference_voltage: 3.3V + resistor: 100kOhm + name: Resistance Sensor + internal: true + + - platform: adc + pin: + number: GPIO7 + id: source_sensor + update_interval: never + attenuation: auto + - platform: sht3xd temperature: name: "Probe Temperature" @@ -132,6 +176,13 @@ switch: - platform: factory_reset id: factory_reset_switch internal: true + - platform: gpio + pin: GPIO15 + id: sensor_selector + restore_mode: RESTORE_DEFAULT_ON + entity_category: "config" + setup_priority: 1100 + internal: true ## TODO: Add Update From 30a2e9afd1f3ed307e0552184b045189d0eeeb0a Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Tue, 25 Feb 2025 22:01:18 -0500 Subject: [PATCH 02/33] Adding Alarm Outside Temp Range --- Integrations/ESPHome/Core.yaml | 124 ++++++++++++++------------- Integrations/ESPHome/TEMP_PRO-1.yaml | 6 +- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 4b1d42a..4732447 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -1,6 +1,6 @@ substitutions: name: apollo-temp-pro-1 - version: "24.10.31.2" + version: "25.2.24.1" device_description: ${name} made by Apollo Automation - version ${version}. esp32: @@ -55,26 +55,9 @@ output: id: buzzer rtttl: - output: buzzer + id: rtttl_buzzer + output: buzzer -select: - - platform: template - name: "Temp Probe select" - optimistic: true - restore_value: true - initial_option: Dallas - id: temp_probe_select - set_action: - - if: - condition: - lambda: 'return x == "Dallas";' - then: - - switch.turn_on: sensor_selector - else: - - switch.turn_off: sensor_selector - options: - - Dallas - - Food binary_sensor: - platform: status @@ -89,6 +72,12 @@ binary_sensor: pullup: true id: reset_button + - platform: template + name: Temperature Within Range + id: temp_within_range + lambda: 'return (id(sht_temperature).state < id(max_temp).state) && (id(sht_temperature).state > id(min_temp).state) && id(alarm_outside_temp_range).state;' + + sensor: - platform: internal_temperature name: "ESP Temperature" @@ -99,50 +88,20 @@ sensor: id: sys_uptime update_interval: 60s - - platform: dallas_temp - name: "Temperature Probe" - update_interval: 5s - id: temp_probe - - - platform: ntc - id: ntc_sensor - name: Food Probe - sensor: resistance_sensor - calibration: - b_constant: 3950 - reference_temperature: 25°C - reference_resistance: 100kOhm - - - platform: resistance - id: resistance_sensor - sensor: source_sensor - configuration: UPSTREAM - reference_voltage: 3.3V - resistor: 100kOhm - name: Resistance Sensor - internal: true - - - platform: adc - pin: - number: GPIO7 - id: source_sensor - update_interval: never - attenuation: auto - - - platform: sht3xd + - platform: sht4x_custom temperature: - name: "Probe Temperature" + name: "Temperature" + id: sht_temperature humidity: - name: "Probe Humidity" - address: 0x44 - update_interval: 60s + name: "Relative Humidity" + id: sht_humidity + light: - platform: esp32_rmt_led_strip id: rgb_light name: "RGB Light" pin: GPIO4 - rmt_channel: 0 default_transition_length: 0s chipset: WS2812 num_leds: 4 @@ -171,19 +130,62 @@ button: name: "Factory Reset ESP" id: factory_reset_all +number: + - platform: template + id: min_temp + name: Min Temperature + min_value: -20 + max_value: 50 + step: 0.1 + unit_of_measurement: '°C' + initial_value: -20 + optimistic: true + update_interval: never + mode: box + + - platform: template + id: max_temp + name: Max Temperature + min_value: -20 + max_value: 50 + step: 0.1 + unit_of_measurement: '°C' + initial_value: 200 + optimistic: true + update_interval: never + mode: box switch: - platform: factory_reset id: factory_reset_switch internal: true - platform: gpio - pin: GPIO15 - id: sensor_selector - restore_mode: RESTORE_DEFAULT_ON - entity_category: "config" + pin: GPIO5 + name: "Accessory Power" + id: accessory_power + restore_mode: ALWAYS_ON setup_priority: 1100 internal: true - + - platform: template + name: "Alarm Outside Temp Range" + id: alarm_outside_temp_range + optimistic: true + restore_mode: RESTORE_DEFAULT_OFF + +interval: + - interval: 10s + then: + if: + condition: + binary_sensor.is_off: temp_within_range + then: + - light.turn_off: rgb_light + - lambda: id(rtttl_buzzer).play("siren:d=8,o=5,b=100:d,e,d,e,d,e,d,e;"); + + +external_components: + - source: github://ApolloAutomation/ExternalComponents + components: [sht4x_custom] ## TODO: Add Update ## TODO: Add Update Frequency Control diff --git a/Integrations/ESPHome/TEMP_PRO-1.yaml b/Integrations/ESPHome/TEMP_PRO-1.yaml index cb201e3..f5d78df 100644 --- a/Integrations/ESPHome/TEMP_PRO-1.yaml +++ b/Integrations/ESPHome/TEMP_PRO-1.yaml @@ -10,14 +10,12 @@ esphome: name: "ApolloAutomation.TEMP_PRO-1" version: "${version}" - min_version: 2024.8.3 + min_version: 2025.2.0 dashboard_import: package_import_url: github://ApolloAutomation/TEMP_PRO-1/Integrations/ESPHome/TEMP_PRO-1.yaml import_full_config: false - - ota: - platform: esphome id: ota_esphome @@ -33,7 +31,7 @@ update: - platform: http_request id: firmware_update name: Firmware Update - source: https://apolloautomation.github.io/TEMP_PRO-1/artifact/manifest.json + source: https://apolloautomation.github.io/TEMP_PRO-1/firmware-l/manifest.json logger: From 848fe884020a4cf4fe4539155dc6549fdb3d6c00 Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Wed, 26 Mar 2025 19:14:10 -0400 Subject: [PATCH 03/33] Alarm System And New Release Pipe --- .github/PULL_REQUEST_TEMPLATE.md | 49 +++ .github/release-drafter.yml | 51 ++++ .github/workflows/build.yml | 285 ++++++++++++------ .github/workflows/ci.yml | 15 +- Integrations/ESPHome/Core.yaml | 85 ++++-- Integrations/ESPHome/TEMP_PRO-1_ETH.yaml | 39 +++ .../{TEMP_PRO-1.yaml => TEMP_PRO-1_W.yaml} | 13 +- 7 files changed, 404 insertions(+), 133 deletions(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/release-drafter.yml create mode 100644 Integrations/ESPHome/TEMP_PRO-1_ETH.yaml rename Integrations/ESPHome/{TEMP_PRO-1.yaml => TEMP_PRO-1_W.yaml} (75%) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..115d2ab --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,49 @@ + +Version: + + +## What does this implement/fix? + + + +## Types of changes + + +- [ ] Bugfix (fixed change that fixes an issue) +- [ ] New feature (thanks!) +- [ ] Breaking change (repair/feature that breaks existing functionality) +- [ ] Dependency Update - Does not publish +- [ ] Other - Does not publish +- [ ] Website of github readme file update - Does not publish +- [ ] Github workflows - Does not publish + + +## Checklist / Checklijst: + + + - [ ] The code change has been tested and works locally + - [ ] The code change has not yet been tested + +If user-visible functionality or configuration variables are added/modified: + - [ ] Added/updated documentation for the web page + + + + diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..2174c71 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,51 @@ +name-template: 'Release v$NEXT_PATCH_VERSION' +tag-template: "$RESOLVED_VERSION" +change-template: "- #$NUMBER $TITLE @$AUTHOR" +sort-direction: ascending + +categories: + - title: "🚨 Breaking changes" + labels: + - "breaking-change" + - title: "✨ New features" + labels: + - "new-feature" + - title: "🐛 Bug fixes" + labels: + - "bugfix" +# - title: "🚀 Enhancements" +# labels: +# - "enhancement" +# - "refactor" +# - "performance" +# - title: "🧰 Maintenance" +# labels: +# - "maintenance" +# - "ci" +# - title: "📚 Documentation" +# labels: +# - "documentation" + - title: "⬆️ Dependency updates" + collapse-after: 5 + labels: + - "dependency-update" +# - title: "🚨🚨 Security Fixes 🚨🚨" +# labels: +# - "security" + + +include-labels: + - "bugfix" + - "new-feature" + - "breaking-change" + +no-changes-template: '- No changes' + +template: | + ## What's Changed + + $CHANGES + + **Full Changelog**: https://github.com/ApolloAutomation/AIR-1_Test/compare/$PREVIOUS_TAG...$RESOLVED_VERSION.1 + + Be sure to 🌟 this repository for updates! \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 33211dc..98cda17 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,143 +1,234 @@ -name: Build +name: Publish env: - DEVICE_NAME: temp_pro-1 # TODO: Rename - RELEASE_URL: ${{ github.server_url }}/${{ github.repository }}/releases/latest + DEVICE_NAME: temp-pro-1 on: push: branches: - main + # Uncomment if needed: + # workflow_dispatch: + # inputs: + # version: + # description: 'The version of the firmware to build' + # required: true + # release: + # types: [published] jobs: - build: - name: Build And Release + check-for-yaml: + name: Check for YAML Changes runs-on: ubuntu-latest + outputs: + yaml_changed: ${{ steps.check.outputs.yaml_changed }} steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 2 # So we can diff the previous commit - - name: Set uppercase DEVICE_NAME + - name: Find .yaml Changes in Last PR Merge + id: check run: | - echo "UPPERCASE_DEVICE_NAME=$(echo $DEVICE_NAME | tr '[:lower:]' '[:upper:]')" >> $GITHUB_ENV + BASE_COMMIT=$(git rev-parse HEAD^1) + MERGE_COMMIT=$(git rev-parse HEAD) - - name: Build Firmware - uses: esphome/build-action@v3.0.0 - id: esphome-build - with: - yaml_file: Integrations/ESPHome/${{ env.UPPERCASE_DEVICE_NAME }}.yaml - version: 'latest' - cache: true + if git diff --name-only $BASE_COMMIT $MERGE_COMMIT | grep -q '\.yaml$'; then + echo "yaml_changed=true" >> $GITHUB_OUTPUT + else + echo "yaml_changed=false" >> $GITHUB_OUTPUT + fi + + set-version: + name: Set Version + runs-on: ubuntu-latest + needs: [check-for-yaml] + if: needs.check-for-yaml.outputs.yaml_changed == 'true' + + # Expose job-level outputs so other jobs can access them + outputs: + version: ${{ steps.read_version.outputs.version }} + upload_url: ${{ steps.run-release-drafter.outputs.upload_url }} + body: ${{ steps.run-release-drafter.outputs.body }} + html_url: ${{ steps.run-release-drafter.outputs.html_url }} + permissions: + contents: write + pages: write + id-token: write + pull-requests: write + + steps: + - name: Checkout code + uses: actions/checkout@v3 - name: Read version from YAML file id: read_version run: | version=$(awk '/substitutions:/ {found=1} found && /version:/ {print $2; exit}' Integrations/ESPHome/Core.yaml | tr -d '"') - echo "project_version=$version" >> $GITHUB_ENV - - - name: Move generated files to output + echo "version=$version" >> $GITHUB_OUTPUT + echo "Detected version: $version" + + - name: Fetch Last Merged PR Body + id: last_pr + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - mkdir -p output - mv ${{ steps.esphome-build.outputs.name }}/* output/ - echo ${{ steps.esphome-build.outputs.version }} > output/version - # Extract MD5 checksum of firmware.ota.bin - MD5_CHECKSUM=$(jq -r '.ota.md5' output/manifest.json) - echo "MD5_CHECKSUM=$MD5_CHECKSUM" >> $GITHUB_ENV + PR_INFO=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \ + "https://api.github.com/repos/${{ github.repository }}/pulls?state=closed&sort=updated&direction=desc&per_page=1") + PR_BODY=$(echo "$PR_INFO" | jq -r '.[0].body') + echo "$PR_BODY" > pr_body.txt - # Create new manifest.json with jq - jq -n --arg name "${{ env.DEVICE_NAME }}" \ - --arg version "${{ env.project_version }}" \ - --arg md5 "$MD5_CHECKSUM" \ - '{name: $name, version: $version, home_assistant_domain: "esphome", new_install_prompt_erase: false, builds: [{chipFamily: "ESP32-C3", parts: [{path: "apollo-${{ env.DEVICE_NAME }}-esp32c3.factory.bin", offset: 0}], ota: {path: "apollo-${{ env.DEVICE_NAME }}-esp32c3.ota.bin", md5: $md5}}]}' > output/manifest.json + - name: 🚀 Run Release Drafter + id: run-release-drafter + uses: release-drafter/release-drafter@v6 + with: + version: ${{ steps.read_version.outputs.version }} + publish: true + tag: ${{ steps.read_version.outputs.version }} + name: Release ${{ steps.read_version.outputs.version }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + build-firmware-e: + name: Build And Release (Firmware) + uses: esphome/workflows/.github/workflows/build.yml@main + needs: + - check-for-yaml + - set-version + if: needs.check-for-yaml.outputs.yaml_changed == 'true' + with: + files: | + Integrations/ESPHome/TEMP_PRO-1_ETH.yaml + esphome-version: stable + combined-name: firmware-e + release-summary: ${{ needs.set-version.outputs.body }} + release-version: ${{ needs.set-version.outputs.version }} + build-firmware-w: + name: Build And Release (Firmware W) + uses: esphome/workflows/.github/workflows/build.yml@main + needs: + - check-for-yaml + - set-version + if: needs.check-for-yaml.outputs.yaml_changed == 'true' + with: + files: | + Integrations/ESPHome/TEMP_PRO-1_W.yaml + esphome-version: stable + combined-name: firmware-w + release-summary: ${{ needs.set-version.outputs.body }} + release-url: ${{ needs.set-version.outputs.html_url }} + release-version: ${{ needs.set-version.outputs.version }} + + build-site: + name: Build Site + runs-on: ubuntu-latest + needs: + - check-for-yaml + - build-firmware-e + - build-firmware-w + - set-version + if: needs.check-for-yaml.outputs.yaml_changed == 'true' + steps: + - name: Checkout source code + uses: actions/checkout@v4 - - uses: actions/upload-artifact@v4.3.3 + - name: Build + uses: actions/jekyll-build-pages@v1.0.13 with: - path: output/ - retention-days: 1 + source: ./static + destination: ./output - - name: Collect merge commits - id: collect_commits - run: | - MERGE_COMMITS=$(git log --merges --pretty=format:"%h %s" $(git describe --tags --abbrev=0 @^)..@) - echo "MERGE_COMMITS=$MERGE_COMMITS" >> $GITHUB_ENV + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: site + path: output - - name: Create Release - if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} + publish: + name: Publish to GitHub Pages + runs-on: ubuntu-latest + needs: + - build-site + - build-firmware-e + - build-firmware-w + - set-version + if: needs.check-for-yaml.outputs.yaml_changed == 'true' && ${{ github.run_attempt == 1 }} + permissions: + contents: write + pages: write + id-token: write + steps: + - name: Checkout code + uses: actions/checkout@v3 + + # 1) Download Firmware + - uses: actions/download-artifact@v4 with: - tag_name: ${{ env.project_version }} - release_name: "Release ${{ env.project_version }}" - body: Release of version ${{ env.project_version }} - - draft: false - prerelease: false - - - name: Upload firmware.factory.bin to Release - if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} + name: firmware-e + path: firmware-e + + # 2) Download Firmware-B + - uses: actions/download-artifact@v4 with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: output/apollo-${{ env.DEVICE_NAME }}-esp32c3.factory.bin - asset_name: apollo-${{ env.DEVICE_NAME }}-esp32c3.factory.bin - asset_content_type: application/octet-stream + name: firmware-w + path: firmware-w + + # 3) Zip them up + - name: Zip firmware + run: | + zip -r firmware-e.zip firmware-e + zip -r firmware-w.zip firmware-w - - name: Upload firmware.ota.bin to Release - if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' + # 4) Upload firmware.zip as an asset + - name: Upload firmware.zip + id: upload-firmware uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: output/apollo-${{ env.DEVICE_NAME }}-esp32c3.ota.bin - asset_name: apollo-${{ env.DEVICE_NAME }}-esp32c3.ota.bin - asset_content_type: application/octet-stream - - - name: Upload manifest.json to Release - if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' + # Use the job-level output from set-version: + upload_url: ${{ needs.set-version.outputs.upload_url }} + asset_path: firmware-e.zip + asset_name: firmware-e.zip + asset_content_type: application/zip + + # 5) Upload firmware-w.zip + - name: Upload firmware-w.zip + id: upload-firmware-w uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: output/manifest.json - asset_name: manifest.json - asset_content_type: application/octet-stream + # Use the job-level output from set-version: + upload_url: ${{ needs.set-version.outputs.upload_url }} + asset_path: firmware-w.zip + asset_name: firmware-w.zip + asset_content_type: application/zip + - name: Copy firmware and manifest + run: |- + mkdir -p output/firmware-e + cp -r firmware-e/${{ needs.build-firmware-e.outputs.version }}/* output/firmware-e/ - prep: - name: Consolidate firmwares - runs-on: ubuntu-latest - needs: - - build - steps: - - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4.1.7 + - name: Copy firmware and manifest + run: |- + mkdir -p output/firmware-w + cp -r firmware-w/${{ needs.build-firmware-w.outputs.version }}/* output/firmware-w/ + + - uses: actions/download-artifact@v4 with: + name: site path: output - - run: cp -R static/* output/ - - uses: actions/upload-pages-artifact@v3.0.1 + + - uses: actions/upload-pages-artifact@v3 with: path: output retention-days: 1 - deploy: - if: contains(fromJSON('["workflow_dispatch", "push", "schedule"]'), github.event_name) && github.ref == 'refs/heads/main' - name: Deploy to GitHub Pages - runs-on: ubuntu-latest - needs: prep - permissions: - pages: write - id-token: write - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - name: Setup Pages uses: actions/configure-pages@v5 + - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4.0.5 + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08062cc..410da7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,8 @@ name: CI on: pull_request: + schedule: + - cron: '0 0 * * 1' jobs: ci: @@ -9,12 +11,17 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - file: # TODO: Rename - - Integrations/ESPHome/TEMP_PRO-1.yaml + file: + - Integrations/ESPHome/TEMP_PRO-1_ETH.yaml + - Integrations/ESPHome/TEMP_PRO-1_W.yaml + esphome-version: + - stable + - beta + - dev steps: - name: Checkout source code uses: actions/checkout@v4.1.7 - name: Build ESPHome firmware to verify configuration - uses: esphome/build-action@v3.1.0 + uses: esphome/build-action@v6 with: - yaml_file: ${{ matrix.file }} \ No newline at end of file + yaml-file: ${{ matrix.file }} diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 4732447..fab430f 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -1,5 +1,4 @@ substitutions: - name: apollo-temp-pro-1 version: "25.2.24.1" device_description: ${name} made by Apollo Automation - version ${version}. @@ -58,7 +57,6 @@ rtttl: id: rtttl_buzzer output: buzzer - binary_sensor: - platform: status name: Online @@ -75,8 +73,12 @@ binary_sensor: - platform: template name: Temperature Within Range id: temp_within_range - lambda: 'return (id(sht_temperature).state < id(max_temp).state) && (id(sht_temperature).state > id(min_temp).state) && id(alarm_outside_temp_range).state;' + lambda: 'return (id(sht_temperature).state < id(max_temp).state) && (id(sht_temperature).state > id(min_temp).state);' + - platform: template + name: Humidity Within Range + id: humidity_within_range + lambda: 'return (id(sht_humidity).state < id(max_humidity).state) && (id(sht_humidity).state > id(min_humidity).state);' sensor: - platform: internal_temperature @@ -88,7 +90,7 @@ sensor: id: sys_uptime update_interval: 60s - - platform: sht4x_custom + - platform: sht3xd temperature: name: "Temperature" id: sht_temperature @@ -96,7 +98,6 @@ sensor: name: "Relative Humidity" id: sht_humidity - light: - platform: esp32_rmt_led_strip id: rgb_light @@ -134,8 +135,8 @@ number: - platform: template id: min_temp name: Min Temperature - min_value: -20 - max_value: 50 + min_value: -60 + max_value: 100 step: 0.1 unit_of_measurement: '°C' initial_value: -20 @@ -146,8 +147,8 @@ number: - platform: template id: max_temp name: Max Temperature - min_value: -20 - max_value: 50 + min_value: -60 + max_value: 100 step: 0.1 unit_of_measurement: '°C' initial_value: 200 @@ -155,6 +156,30 @@ number: update_interval: never mode: box + - platform: template + id: min_humidity + name: Min Humidity + min_value: 0 + max_value: 100 + step: 0.1 + unit_of_measurement: '%' + initial_value: 0 + optimistic: true + update_interval: never + mode: box + + - platform: template + id: max_humidity + name: Max Humidity + min_value: 0 + max_value: 100 + step: 0.1 + unit_of_measurement: '%' + initial_value: 100 + optimistic: true + update_interval: never + mode: box + switch: - platform: factory_reset id: factory_reset_switch @@ -172,24 +197,34 @@ switch: optimistic: true restore_mode: RESTORE_DEFAULT_OFF + - platform: template + name: "Alarm Outside Humidity Range" + id: alarm_outside_humidity_range + optimistic: true + restore_mode: RESTORE_DEFAULT_OFF + interval: - - interval: 10s + - interval: 10s + startup_delay: 10s then: - if: - condition: - binary_sensor.is_off: temp_within_range - then: - - light.turn_off: rgb_light - - lambda: id(rtttl_buzzer).play("siren:d=8,o=5,b=100:d,e,d,e,d,e,d,e;"); + - if: + condition: + lambda: !lambda |- + return (id(alarm_outside_temp_range).state && !id(temp_within_range).state) || (id(alarm_outside_humidity_range).state && !id(humidity_within_range).state); + then: + - lambda: !lambda |- + id(rgb_light).turn_on().set_effect("Fast Pulse").perform(); + id(rgb_light).turn_on().set_rgb(1, 0, 0).set_transition_length(0).perform(); + id(rtttl_buzzer).play("siren:d=8,o=5,b=100:d,e,d,e,d,e,d,e;"); + else: + if: + condition: + lambda: !lambda |- + return (id(temp_within_range).state && id(humidity_within_range).state); + then: + - light.turn_off: rgb_light -external_components: - - source: github://ApolloAutomation/ExternalComponents - components: [sht4x_custom] - -## TODO: Add Update ## TODO: Add Update Frequency Control -## TODO: Add Beep for outside temp/humidity range -## TODO: LED Blinks outside temp/humidity range -## TODO: LED range for yellow/red -## TODO: Add offset \ No newline at end of file + +## TODO: Specific Repo For Lot \ No newline at end of file diff --git a/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml b/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml new file mode 100644 index 0000000..e7fa534 --- /dev/null +++ b/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml @@ -0,0 +1,39 @@ +esphome: + name: "apollo-temp-pro-1-eth" + friendly_name: Apollo TEMP_PRO-1 ETH + comment: Apollo TEMP_PRO-1 ETH + name_add_mac_suffix: true + platformio_options: + board_build.flash_mode: dio + + project: + name: "ApolloAutomation.TEMP_PRO-1-ETH" + version: "${version}" + + min_version: 2025.2.0 + +dashboard_import: + package_import_url: github://ApolloAutomation/TEMP_PRO-1/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml + import_full_config: false + +ota: + - platform: esphome + id: ota_esphome + - platform: http_request + id: ota_managed + +http_request: + verify_ssl: true + +safe_mode: + +update: + - platform: http_request + id: firmware_update + name: Firmware Update + source: https://apolloautomation.github.io/TEMP_PRO-1/firmware-e/manifest.json + +logger: + +packages: + core: !include Core.yaml diff --git a/Integrations/ESPHome/TEMP_PRO-1.yaml b/Integrations/ESPHome/TEMP_PRO-1_W.yaml similarity index 75% rename from Integrations/ESPHome/TEMP_PRO-1.yaml rename to Integrations/ESPHome/TEMP_PRO-1_W.yaml index f5d78df..6f8157b 100644 --- a/Integrations/ESPHome/TEMP_PRO-1.yaml +++ b/Integrations/ESPHome/TEMP_PRO-1_W.yaml @@ -1,19 +1,19 @@ esphome: - name: "${name}" - friendly_name: Apollo TEMP_PRO-1 - comment: Apollo TEMP_PRO-1 + name: "apollo-temp-pro-1-w" + friendly_name: Apollo TEMP_PRO-1 W + comment: Apollo TEMP_PRO-1 W name_add_mac_suffix: true platformio_options: board_build.flash_mode: dio project: - name: "ApolloAutomation.TEMP_PRO-1" + name: "ApolloAutomation.TEMP_PRO-1-W" version: "${version}" min_version: 2025.2.0 dashboard_import: - package_import_url: github://ApolloAutomation/TEMP_PRO-1/Integrations/ESPHome/TEMP_PRO-1.yaml + package_import_url: github://ApolloAutomation/TEMP_PRO-1/Integrations/ESPHome/TEMP_PRO-1_W.yaml import_full_config: false ota: @@ -31,8 +31,7 @@ update: - platform: http_request id: firmware_update name: Firmware Update - source: https://apolloautomation.github.io/TEMP_PRO-1/firmware-l/manifest.json - + source: https://apolloautomation.github.io/TEMP_PRO-1/firmware-w/manifest.json logger: From a37bb746fc6999385cc5a5524c3c247015cd7ece Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Wed, 26 Mar 2025 19:14:39 -0400 Subject: [PATCH 04/33] Update Version --- Integrations/ESPHome/Core.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index fab430f..21f1c1f 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -1,5 +1,5 @@ substitutions: - version: "25.2.24.1" + version: "25.3.26.1" device_description: ${name} made by Apollo Automation - version ${version}. esp32: From 758779ed0bd761a9f3145671ecf3225449db7040 Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Mon, 21 Apr 2025 11:37:43 -0400 Subject: [PATCH 05/33] Power Control Working --- Integrations/ESPHome/Core.yaml | 86 +++++++++++++++++++----- Integrations/ESPHome/TEMP_PRO-1_ETH.yaml | 28 +++++++- Integrations/ESPHome/TEMP_PRO-1_W.yaml | 45 ++++++++++++- 3 files changed, 139 insertions(+), 20 deletions(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 21f1c1f..1034abe 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -1,6 +1,6 @@ substitutions: - version: "25.3.26.1" - device_description: ${name} made by Apollo Automation - version ${version}. + version: "25.4.3.1" + device_description: $TEMP_PRO-1 made by Apollo Automation - version ${version}. esp32: board: esp32-s3-devkitc-1 @@ -33,15 +33,6 @@ i2c: web_server: port: 80 - -ethernet: - type: W5500 - clk_pin: GPIO10 - mosi_pin: GPIO12 - miso_pin: GPIO11 - cs_pin: GPIO9 - interrupt_pin: GPIO13 - reset_pin: GPIO14 one_wire: - platform: gpio @@ -69,21 +60,37 @@ binary_sensor: input: true pullup: true id: reset_button + on_press: + then: + - lambda: |- + id(button_press_timestamp) = millis(); + on_release: + then: + - lambda: |- + if (millis() - id(button_press_timestamp) >= 10000) { + // Remove Wifi + id(factory_reset_switch).turn_on(); + } + else { + // StatusCheck + id(statusCheck).execute(); + } - platform: template name: Temperature Within Range id: temp_within_range - lambda: 'return (id(sht_temperature).state < id(max_temp).state) && (id(sht_temperature).state > id(min_temp).state);' + lambda: 'return (id(sht_temperature).state <= id(max_temp).state) && (id(sht_temperature).state >= id(min_temp).state);' - platform: template name: Humidity Within Range id: humidity_within_range - lambda: 'return (id(sht_humidity).state < id(max_humidity).state) && (id(sht_humidity).state > id(min_humidity).state);' + lambda: 'return (id(sht_humidity).state <= id(max_humidity).state) && (id(sht_humidity).state >= id(min_humidity).state);' sensor: - platform: internal_temperature name: "ESP Temperature" id: sys_esp_temperature + disabled_by_default: true - platform: uptime name: Uptime @@ -122,6 +129,16 @@ light: max_brightness: 100% button: + - platform: template + name: "Update Firmware" + id: update_firmware + entity_category: config + on_press: + then: + - lambda: |- + id(update_http_request).perform(true); + + - platform: restart icon: mdi:power-cycle name: "ESP Reboot" @@ -131,6 +148,8 @@ button: name: "Factory Reset ESP" id: factory_reset_all + + number: - platform: template id: min_temp @@ -184,25 +203,54 @@ switch: - platform: factory_reset id: factory_reset_switch internal: true + - platform: gpio - pin: GPIO5 + pin: GPIO7 name: "Accessory Power" id: accessory_power restore_mode: ALWAYS_ON setup_priority: 1100 internal: true + - platform: template name: "Alarm Outside Temp Range" id: alarm_outside_temp_range optimistic: true restore_mode: RESTORE_DEFAULT_OFF + - platform: template name: "Alarm Outside Humidity Range" id: alarm_outside_humidity_range optimistic: true restore_mode: RESTORE_DEFAULT_OFF +select: + - platform: template + id: firmware_selector + name: Firmware Type + icon: "mdi:test-tube" + entity_category: config + optimistic: true + restore_value: true + options: + - "WiFi" + - "Ethernet" + initial_option: "WiFi" + on_value: + then: + - if: + condition: + lambda: 'return id(firmware_selector).state == "Ethernet";' + then: + - logger.log: "OTA updates set to use ethernet firmware" + - lambda: id(update_http_request).set_source_url("https://apolloautomation.github.io/TEMP_PROJECT-1/firmware-e/manifest.json"); + - component.update: update_http_request + else: + - logger.log: "OTA updates set to use wifi firmware" + - lambda: id(update_http_request).set_source_url("https://apolloautomation.github.io/TEMP_PROJECT-1/firmware-w/manifest.json"); + - component.update: update_http_request + interval: - interval: 10s startup_delay: 10s @@ -224,7 +272,9 @@ interval: then: - light.turn_off: rgb_light - -## TODO: Add Update Frequency Control - -## TODO: Specific Repo For Lot \ No newline at end of file +text_sensor: + - platform: template + name: "OTA URL" + id: ota_url + entity_category: "diagnostic" + internal: true \ No newline at end of file diff --git a/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml b/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml index e7fa534..606359e 100644 --- a/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml +++ b/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml @@ -29,11 +29,37 @@ safe_mode: update: - platform: http_request - id: firmware_update + id: update_http_request name: Firmware Update source: https://apolloautomation.github.io/TEMP_PRO-1/firmware-e/manifest.json logger: +ethernet: + type: W5500 + clk_pin: GPIO10 + mosi_pin: GPIO12 + miso_pin: GPIO11 + cs_pin: GPIO9 + interrupt_pin: GPIO13 + reset_pin: GPIO14 + +script: + - id: statusCheck + then: + - if: + condition: + - lambda: 'return id(ink_ha_connected).state;' + then: + - logger.log: "Apollo Automation: Connected To HA" + - light.turn_on: + id: rgb_light + brightness: 100% + red: 0% + green: 0% + blue: 100% + - delay: 5s + - light.turn_off: rgb_light + packages: core: !include Core.yaml diff --git a/Integrations/ESPHome/TEMP_PRO-1_W.yaml b/Integrations/ESPHome/TEMP_PRO-1_W.yaml index 6f8157b..108f117 100644 --- a/Integrations/ESPHome/TEMP_PRO-1_W.yaml +++ b/Integrations/ESPHome/TEMP_PRO-1_W.yaml @@ -29,11 +29,54 @@ safe_mode: update: - platform: http_request - id: firmware_update + id: update_http_request name: Firmware Update source: https://apolloautomation.github.io/TEMP_PRO-1/firmware-w/manifest.json logger: +wifi: + ap: + ssid: "Apollo TEMP_PRO-1 Hotspot" + +captive_portal: + +script: + - id: statusCheck + then: + - if: + condition: + - lambda: 'return id(ink_ha_connected).state;' + then: + - logger.log: "Apollo Automation: Connected To HA" + - light.turn_on: + id: rgb_light + brightness: 100% + red: 0% + green: 0% + blue: 100% + else: + - if: + condition: + - wifi.connected + then: + - logger.log: "Apollo Automation: Connected To Wifi" + - light.turn_on: + id: rgb_light + brightness: 100% + red: 0% + green: 100% + blue: 0% + else: + - logger.log: "Apollo Automation: Not Connected To Wifi" + - light.turn_on: + id: rgb_light + brightness: 100% + red: 100% + green: 100% + blue: 0% + - delay: 5s + - light.turn_off: rgb_light + packages: core: !include Core.yaml From 5f155bc7cbc191be65d7c6077d7272ad8677ca80 Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Mon, 21 Apr 2025 12:25:57 -0400 Subject: [PATCH 06/33] CO2 --- Integrations/ESPHome/Core.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 1034abe..8c2489a 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -104,6 +104,25 @@ sensor: humidity: name: "Relative Humidity" id: sht_humidity + - platform: dps310 + id: dps_310 + pressure: + name: "DPS310 Pressure" + id: dps310pressure + temperature: + id: dps310temperature + internal: true + update_interval: 30s + - platform: scd4x + id: scd40 + co2: + name: "CO2" + id: "co2" + automatic_self_calibration: false + update_interval: 60s + measurement_mode: "periodic" + i2c_id: bus_a + ambient_pressure_compensation_source: dps310pressure light: - platform: esp32_rmt_led_strip From e1c267f1e8eeb7ee07c837083e73329ce67f7d2f Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Mon, 28 Apr 2025 13:09:07 -0400 Subject: [PATCH 07/33] Prod Ready --- Integrations/ESPHome/Core.yaml | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 8c2489a..6604d58 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -1,5 +1,5 @@ substitutions: - version: "25.4.3.1" + version: "25.4.28.1" device_description: $TEMP_PRO-1 made by Apollo Automation - version ${version}. esp32: @@ -104,25 +104,6 @@ sensor: humidity: name: "Relative Humidity" id: sht_humidity - - platform: dps310 - id: dps_310 - pressure: - name: "DPS310 Pressure" - id: dps310pressure - temperature: - id: dps310temperature - internal: true - update_interval: 30s - - platform: scd4x - id: scd40 - co2: - name: "CO2" - id: "co2" - automatic_self_calibration: false - update_interval: 60s - measurement_mode: "periodic" - i2c_id: bus_a - ambient_pressure_compensation_source: dps310pressure light: - platform: esp32_rmt_led_strip @@ -181,6 +162,7 @@ number: optimistic: true update_interval: never mode: box + entity_category: config - platform: template id: max_temp @@ -193,6 +175,7 @@ number: optimistic: true update_interval: never mode: box + entity_category: config - platform: template id: min_humidity @@ -205,6 +188,7 @@ number: optimistic: true update_interval: never mode: box + entity_category: config - platform: template id: max_humidity @@ -217,6 +201,8 @@ number: optimistic: true update_interval: never mode: box + entity_category: config + switch: - platform: factory_reset From b5a29067a49467d18def0bb8c5035a8082081c5c Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Fri, 9 May 2025 17:03:33 -0400 Subject: [PATCH 08/33] Fix LEDs Constantly Being Turned Off --- Integrations/ESPHome/Core.yaml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 6604d58..0e5b723 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -1,5 +1,5 @@ substitutions: - version: "25.4.28.1" + version: "25.5.9.1" device_description: $TEMP_PRO-1 made by Apollo Automation - version ${version}. esp32: @@ -86,6 +86,15 @@ binary_sensor: id: humidity_within_range lambda: 'return (id(sht_humidity).state <= id(max_humidity).state) && (id(sht_humidity).state >= id(min_humidity).state);' + - platform: template + name: Alarm Active + id: alarm_active + update_interval: 1s + lambda: 'return (id(alarm_outside_temp_range).state && !id(temp_within_range).state) || (id(alarm_outside_humidity_range).state && !id(humidity_within_range).state);' + on_release: + then: + - light.turn_off: rgb_light + sensor: - platform: internal_temperature name: "ESP Temperature" @@ -256,26 +265,19 @@ select: - lambda: id(update_http_request).set_source_url("https://apolloautomation.github.io/TEMP_PROJECT-1/firmware-w/manifest.json"); - component.update: update_http_request -interval: +interval: - interval: 10s startup_delay: 10s then: - if: condition: lambda: !lambda |- - return (id(alarm_outside_temp_range).state && !id(temp_within_range).state) || (id(alarm_outside_humidity_range).state && !id(humidity_within_range).state); + return id(alarm_active).state; then: - lambda: !lambda |- id(rgb_light).turn_on().set_effect("Fast Pulse").perform(); id(rgb_light).turn_on().set_rgb(1, 0, 0).set_transition_length(0).perform(); id(rtttl_buzzer).play("siren:d=8,o=5,b=100:d,e,d,e,d,e,d,e;"); - else: - if: - condition: - lambda: !lambda |- - return (id(temp_within_range).state && id(humidity_within_range).state); - then: - - light.turn_off: rgb_light text_sensor: - platform: template From 0892f255483709c53abd25b68addd797f1fdeb8a Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Fri, 9 May 2025 17:42:10 -0400 Subject: [PATCH 09/33] Bug Fix --- .github/release-drafter.yml | 2 +- Integrations/ESPHome/Core.yaml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 2174c71..f450236 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -46,6 +46,6 @@ template: | $CHANGES - **Full Changelog**: https://github.com/ApolloAutomation/AIR-1_Test/compare/$PREVIOUS_TAG...$RESOLVED_VERSION.1 + **Full Changelog**: https://github.com/ApolloAutomation/TEMP_PRO-1/compare/$PREVIOUS_TAG...$RESOLVED_VERSION.1 Be sure to 🌟 this repository for updates! \ No newline at end of file diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 0e5b723..c44e631 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -89,7 +89,6 @@ binary_sensor: - platform: template name: Alarm Active id: alarm_active - update_interval: 1s lambda: 'return (id(alarm_outside_temp_range).state && !id(temp_within_range).state) || (id(alarm_outside_humidity_range).state && !id(humidity_within_range).state);' on_release: then: From 5c9c55752d1f5079ef1bd88f444e9680eb9018c0 Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Wed, 14 May 2025 11:53:24 -0400 Subject: [PATCH 10/33] Update CI Jobs --- .github/dependabot.yml | 17 +++ .github/workflows/build.yml | 237 ++------------------------------ .github/workflows/ci.yml | 32 +++-- .github/workflows/weekly.yml | 40 ++++++ Integrations/ESPHome/Core.yaml | 2 +- index.html => static/index.html | 27 ++-- 6 files changed, 107 insertions(+), 248 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/weekly.yml rename index.html => static/index.html (73%) diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..a689b1e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +# To get started with Dependabot version updates, you'll need to specify which + # package ecosystems to update and where the package manifests are located. + # Please see the documentation for all configuration options: + # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + + version: 2 + updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + commit-message: + prefix: "chore(ci): " + groups: + github-actions: + patterns: + - "*" \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 98cda17..217b673 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,234 +1,21 @@ name: Publish -env: - DEVICE_NAME: temp-pro-1 on: push: branches: - main - # Uncomment if needed: - # workflow_dispatch: - # inputs: - # version: - # description: 'The version of the firmware to build' - # required: true - # release: - # types: [published] + paths: + - "**.yaml" -jobs: - check-for-yaml: - name: Check for YAML Changes - runs-on: ubuntu-latest - outputs: - yaml_changed: ${{ steps.check.outputs.yaml_changed }} - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 2 # So we can diff the previous commit - - - name: Find .yaml Changes in Last PR Merge - id: check - run: | - BASE_COMMIT=$(git rev-parse HEAD^1) - MERGE_COMMIT=$(git rev-parse HEAD) - - if git diff --name-only $BASE_COMMIT $MERGE_COMMIT | grep -q '\.yaml$'; then - echo "yaml_changed=true" >> $GITHUB_OUTPUT - else - echo "yaml_changed=false" >> $GITHUB_OUTPUT - fi - - set-version: - name: Set Version - runs-on: ubuntu-latest - needs: [check-for-yaml] - if: needs.check-for-yaml.outputs.yaml_changed == 'true' - - # Expose job-level outputs so other jobs can access them - outputs: - version: ${{ steps.read_version.outputs.version }} - upload_url: ${{ steps.run-release-drafter.outputs.upload_url }} - body: ${{ steps.run-release-drafter.outputs.body }} - html_url: ${{ steps.run-release-drafter.outputs.html_url }} - permissions: - contents: write - pages: write - id-token: write - pull-requests: write - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Read version from YAML file - id: read_version - run: | - version=$(awk '/substitutions:/ {found=1} found && /version:/ {print $2; exit}' Integrations/ESPHome/Core.yaml | tr -d '"') - echo "version=$version" >> $GITHUB_OUTPUT - echo "Detected version: $version" - - - name: Fetch Last Merged PR Body - id: last_pr - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - PR_INFO=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \ - "https://api.github.com/repos/${{ github.repository }}/pulls?state=closed&sort=updated&direction=desc&per_page=1") - PR_BODY=$(echo "$PR_INFO" | jq -r '.[0].body') - echo "$PR_BODY" > pr_body.txt - - - name: 🚀 Run Release Drafter - id: run-release-drafter - uses: release-drafter/release-drafter@v6 - with: - version: ${{ steps.read_version.outputs.version }} - publish: true - tag: ${{ steps.read_version.outputs.version }} - name: Release ${{ steps.read_version.outputs.version }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - build-firmware-e: - name: Build And Release (Firmware) - uses: esphome/workflows/.github/workflows/build.yml@main - needs: - - check-for-yaml - - set-version - if: needs.check-for-yaml.outputs.yaml_changed == 'true' - with: - files: | - Integrations/ESPHome/TEMP_PRO-1_ETH.yaml - esphome-version: stable - combined-name: firmware-e - release-summary: ${{ needs.set-version.outputs.body }} - release-version: ${{ needs.set-version.outputs.version }} - - build-firmware-w: - name: Build And Release (Firmware W) - uses: esphome/workflows/.github/workflows/build.yml@main - needs: - - check-for-yaml - - set-version - if: needs.check-for-yaml.outputs.yaml_changed == 'true' - with: - files: | - Integrations/ESPHome/TEMP_PRO-1_W.yaml - esphome-version: stable - combined-name: firmware-w - release-summary: ${{ needs.set-version.outputs.body }} - release-url: ${{ needs.set-version.outputs.html_url }} - release-version: ${{ needs.set-version.outputs.version }} - - build-site: - name: Build Site - runs-on: ubuntu-latest - needs: - - check-for-yaml - - build-firmware-e - - build-firmware-w - - set-version - if: needs.check-for-yaml.outputs.yaml_changed == 'true' - steps: - - name: Checkout source code - uses: actions/checkout@v4 - - - name: Build - uses: actions/jekyll-build-pages@v1.0.13 - with: - source: ./static - destination: ./output - - - name: Upload - uses: actions/upload-artifact@v4 - with: - name: site - path: output +permissions: + contents: write + pages: write + id-token: write + pull-requests: write +jobs: publish: - name: Publish to GitHub Pages - runs-on: ubuntu-latest - needs: - - build-site - - build-firmware-e - - build-firmware-w - - set-version - if: needs.check-for-yaml.outputs.yaml_changed == 'true' && ${{ github.run_attempt == 1 }} - permissions: - contents: write - pages: write - id-token: write - steps: - - name: Checkout code - uses: actions/checkout@v3 - - # 1) Download Firmware - - uses: actions/download-artifact@v4 - with: - name: firmware-e - path: firmware-e - - # 2) Download Firmware-B - - uses: actions/download-artifact@v4 - with: - name: firmware-w - path: firmware-w - - # 3) Zip them up - - name: Zip firmware - run: | - zip -r firmware-e.zip firmware-e - zip -r firmware-w.zip firmware-w - - # 4) Upload firmware.zip as an asset - - name: Upload firmware.zip - id: upload-firmware - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - # Use the job-level output from set-version: - upload_url: ${{ needs.set-version.outputs.upload_url }} - asset_path: firmware-e.zip - asset_name: firmware-e.zip - asset_content_type: application/zip - - # 5) Upload firmware-w.zip - - name: Upload firmware-w.zip - id: upload-firmware-w - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - # Use the job-level output from set-version: - upload_url: ${{ needs.set-version.outputs.upload_url }} - asset_path: firmware-w.zip - asset_name: firmware-w.zip - asset_content_type: application/zip - - - name: Copy firmware and manifest - run: |- - mkdir -p output/firmware-e - cp -r firmware-e/${{ needs.build-firmware-e.outputs.version }}/* output/firmware-e/ - - - name: Copy firmware and manifest - run: |- - mkdir -p output/firmware-w - cp -r firmware-w/${{ needs.build-firmware-w.outputs.version }}/* output/firmware-w/ - - - uses: actions/download-artifact@v4 - with: - name: site - path: output - - - uses: actions/upload-pages-artifact@v3 - with: - path: output - retention-days: 1 - - - name: Setup Pages - uses: actions/configure-pages@v5 - - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 \ No newline at end of file + uses: ApolloAutomation/Workflows/.github/workflows/publish.yml@main + with: + core_yaml_path: Integrations/ESPHome/Core.yaml + firmwares_json: '[{"yaml": "Integrations/ESPHome/TEMP_PRO-1_ETH.yaml", "name": "firmware-e"}, {"yaml": "Integrations/ESPHome/TEMP_PRO-1_W.yaml", "name": "firmware-w"}]' \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 410da7b..330a650 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,26 +2,34 @@ name: CI on: pull_request: - schedule: - - cron: '0 0 * * 1' + +permissions: + # Allow GITHUB_TOKEN to add labels to pull requests + pull-requests: write + issues: write + contents: read + id-token: write + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true jobs: + label-check: + uses: ApolloAutomation/Workflows/.github/workflows/label-check.yml@main ci: - name: Building ${{ matrix.file }} - runs-on: ubuntu-latest + needs: [ label-check ] strategy: + fail-fast: false matrix: file: - - Integrations/ESPHome/TEMP_PRO-1_ETH.yaml - Integrations/ESPHome/TEMP_PRO-1_W.yaml + - Integrations/ESPHome/TEMP_PRO-1_ETH.yaml esphome-version: - stable - beta - dev - steps: - - name: Checkout source code - uses: actions/checkout@v4.1.7 - - name: Build ESPHome firmware to verify configuration - uses: esphome/build-action@v6 - with: - yaml-file: ${{ matrix.file }} + uses: ApolloAutomation/Workflows/.github/workflows/build.yml@main + with: + file: ${{ matrix.file }} + esphome-version: ${{ matrix.esphome-version }} \ No newline at end of file diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml new file mode 100644 index 0000000..998e33f --- /dev/null +++ b/.github/workflows/weekly.yml @@ -0,0 +1,40 @@ +name: Weekly Firmware Build + +on: + schedule: + - cron: '0 0 * * 1' + +permissions: + contents: read + id-token: write + +jobs: + ci: + strategy: + fail-fast: false + matrix: + file: + - Integrations/ESPHome/TEMP_PRO-1_W.yaml + - Integrations/ESPHome/TEMP_PRO-1_ETH.yaml + esphome-version: + - stable + - beta + - dev + uses: ApolloAutomation/Workflows/.github/workflows/build.yml@main + with: + file: ${{ matrix.file }} + esphome-version: ${{ matrix.esphome-version }} + + notify: + name: Notify on Failure + needs: [ ci ] + if: failure() + runs-on: ubuntu-latest + steps: + - name: Send Discord notification + uses: sarisia/actions-status-discord@v1 + with: + webhook: ${{ secrets.DISCORD_WEBHOOK }} + status: ${{ needs.ci.result }} + title: Build Failed - ESPHome Firmware + description: One or more ESPHome firmware builds failed. Check the logs for details. \ No newline at end of file diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index c44e631..ff9f73e 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -1,5 +1,5 @@ substitutions: - version: "25.5.9.1" + version: "25.5.14.1" device_description: $TEMP_PRO-1 made by Apollo Automation - version ${version}. esp32: diff --git a/index.html b/static/index.html similarity index 73% rename from index.html rename to static/index.html index 72b7774..4e4a168 100644 --- a/index.html +++ b/static/index.html @@ -2,10 +2,10 @@ - Apollo AIR-1 Installer + Apollo TEMP PRO-1 Installer @@ -79,16 +79,23 @@
-

Apollo AIR-1 Installer

+

Apollo TEMP PRO-1 Installer

-

- - -

- +
+
+

Wifi Firmware

+ +
+
+

Ethernet Firmware

+ +
+
+ +
From 9e0a18fcd76e56ce63167a590da3278bc0c867b0 Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Wed, 14 May 2025 13:45:24 -0400 Subject: [PATCH 11/33] Bump --- Integrations/ESPHome/Core.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index ff9f73e..8f5e8b1 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -1,5 +1,5 @@ substitutions: - version: "25.5.14.1" + version: "25.5.14.2" device_description: $TEMP_PRO-1 made by Apollo Automation - version ${version}. esp32: From 2978c848eb4c7fdc5487d1b0609a7d65074d4650 Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Thu, 15 May 2025 12:47:22 -0400 Subject: [PATCH 12/33] Add Dallas Probe --- Integrations/ESPHome/Core.yaml | 50 +++++++++++------------- Integrations/ESPHome/TEMP_PRO-1_ETH.yaml | 26 ++++++++++++ Integrations/ESPHome/TEMP_PRO-1_W.yaml | 26 ++++++++++++ 3 files changed, 74 insertions(+), 28 deletions(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 8f5e8b1..6cc94c3 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -107,12 +107,32 @@ sensor: - platform: sht3xd temperature: - name: "Temperature" + name: "SHT Temperature" id: sht_temperature humidity: - name: "Relative Humidity" + name: "SHT Relative Humidity" id: sht_humidity + - platform: dallas_temp + name: "Dallas Temperature Probe" + update_interval: 60s + id: temp_probe + filters: + - lambda: |- + if (isnan(x)) { + return NAN; + } + + if (x == 85.0) { + return NAN; + } + + if (id(temp_probe_select).state == "Food") { + return NAN; + } + + return x; + light: - platform: esp32_rmt_led_strip id: rgb_light @@ -238,32 +258,6 @@ switch: optimistic: true restore_mode: RESTORE_DEFAULT_OFF -select: - - platform: template - id: firmware_selector - name: Firmware Type - icon: "mdi:test-tube" - entity_category: config - optimistic: true - restore_value: true - options: - - "WiFi" - - "Ethernet" - initial_option: "WiFi" - on_value: - then: - - if: - condition: - lambda: 'return id(firmware_selector).state == "Ethernet";' - then: - - logger.log: "OTA updates set to use ethernet firmware" - - lambda: id(update_http_request).set_source_url("https://apolloautomation.github.io/TEMP_PROJECT-1/firmware-e/manifest.json"); - - component.update: update_http_request - else: - - logger.log: "OTA updates set to use wifi firmware" - - lambda: id(update_http_request).set_source_url("https://apolloautomation.github.io/TEMP_PROJECT-1/firmware-w/manifest.json"); - - component.update: update_http_request - interval: - interval: 10s startup_delay: 10s diff --git a/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml b/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml index 606359e..44fe53c 100644 --- a/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml +++ b/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml @@ -61,5 +61,31 @@ script: - delay: 5s - light.turn_off: rgb_light +select: + - platform: template + id: firmware_selector + name: Firmware Type + icon: "mdi:test-tube" + entity_category: config + optimistic: true + restore_value: true + options: + - "WiFi" + - "Ethernet" + initial_option: "Ethernet" + on_value: + then: + - if: + condition: + lambda: 'return id(firmware_selector).state == "Ethernet";' + then: + - logger.log: "OTA updates set to use ethernet firmware" + - lambda: id(update_http_request).set_source_url("https://apolloautomation.github.io/TEMP_PROJECT-1/firmware-e/manifest.json"); + - component.update: update_http_request + else: + - logger.log: "OTA updates set to use wifi firmware" + - lambda: id(update_http_request).set_source_url("https://apolloautomation.github.io/TEMP_PROJECT-1/firmware-w/manifest.json"); + - component.update: update_http_request + packages: core: !include Core.yaml diff --git a/Integrations/ESPHome/TEMP_PRO-1_W.yaml b/Integrations/ESPHome/TEMP_PRO-1_W.yaml index 108f117..638e779 100644 --- a/Integrations/ESPHome/TEMP_PRO-1_W.yaml +++ b/Integrations/ESPHome/TEMP_PRO-1_W.yaml @@ -78,5 +78,31 @@ script: - delay: 5s - light.turn_off: rgb_light +select: + - platform: template + id: firmware_selector + name: Firmware Type + icon: "mdi:test-tube" + entity_category: config + optimistic: true + restore_value: true + options: + - "WiFi" + - "Ethernet" + initial_option: "WiFi" + on_value: + then: + - if: + condition: + lambda: 'return id(firmware_selector).state == "Ethernet";' + then: + - logger.log: "OTA updates set to use ethernet firmware" + - lambda: id(update_http_request).set_source_url("https://apolloautomation.github.io/TEMP_PROJECT-1/firmware-e/manifest.json"); + - component.update: update_http_request + else: + - logger.log: "OTA updates set to use wifi firmware" + - lambda: id(update_http_request).set_source_url("https://apolloautomation.github.io/TEMP_PROJECT-1/firmware-w/manifest.json"); + - component.update: update_http_request + packages: core: !include Core.yaml From ec4d013fc659b0d1f5843a6855247a6a905dc1f2 Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Thu, 15 May 2025 15:20:22 -0400 Subject: [PATCH 13/33] CI --- .github/workflows/build.yml | 237 +++++++++++++++++++++++-- .github/workflows/ci.yml | 32 ++-- .github/workflows/weekly.yml | 40 ----- Integrations/ESPHome/Core.yaml | 5 +- Integrations/ESPHome/TEMP_PRO-1_W.yaml | 18 +- 5 files changed, 256 insertions(+), 76 deletions(-) delete mode 100644 .github/workflows/weekly.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 217b673..98cda17 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,21 +1,234 @@ name: Publish +env: + DEVICE_NAME: temp-pro-1 on: push: branches: - main - paths: - - "**.yaml" - -permissions: - contents: write - pages: write - id-token: write - pull-requests: write + # Uncomment if needed: + # workflow_dispatch: + # inputs: + # version: + # description: 'The version of the firmware to build' + # required: true + # release: + # types: [published] jobs: - publish: - uses: ApolloAutomation/Workflows/.github/workflows/publish.yml@main + check-for-yaml: + name: Check for YAML Changes + runs-on: ubuntu-latest + outputs: + yaml_changed: ${{ steps.check.outputs.yaml_changed }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 2 # So we can diff the previous commit + + - name: Find .yaml Changes in Last PR Merge + id: check + run: | + BASE_COMMIT=$(git rev-parse HEAD^1) + MERGE_COMMIT=$(git rev-parse HEAD) + + if git diff --name-only $BASE_COMMIT $MERGE_COMMIT | grep -q '\.yaml$'; then + echo "yaml_changed=true" >> $GITHUB_OUTPUT + else + echo "yaml_changed=false" >> $GITHUB_OUTPUT + fi + + set-version: + name: Set Version + runs-on: ubuntu-latest + needs: [check-for-yaml] + if: needs.check-for-yaml.outputs.yaml_changed == 'true' + + # Expose job-level outputs so other jobs can access them + outputs: + version: ${{ steps.read_version.outputs.version }} + upload_url: ${{ steps.run-release-drafter.outputs.upload_url }} + body: ${{ steps.run-release-drafter.outputs.body }} + html_url: ${{ steps.run-release-drafter.outputs.html_url }} + permissions: + contents: write + pages: write + id-token: write + pull-requests: write + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Read version from YAML file + id: read_version + run: | + version=$(awk '/substitutions:/ {found=1} found && /version:/ {print $2; exit}' Integrations/ESPHome/Core.yaml | tr -d '"') + echo "version=$version" >> $GITHUB_OUTPUT + echo "Detected version: $version" + + - name: Fetch Last Merged PR Body + id: last_pr + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + PR_INFO=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \ + "https://api.github.com/repos/${{ github.repository }}/pulls?state=closed&sort=updated&direction=desc&per_page=1") + PR_BODY=$(echo "$PR_INFO" | jq -r '.[0].body') + echo "$PR_BODY" > pr_body.txt + + - name: 🚀 Run Release Drafter + id: run-release-drafter + uses: release-drafter/release-drafter@v6 + with: + version: ${{ steps.read_version.outputs.version }} + publish: true + tag: ${{ steps.read_version.outputs.version }} + name: Release ${{ steps.read_version.outputs.version }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + build-firmware-e: + name: Build And Release (Firmware) + uses: esphome/workflows/.github/workflows/build.yml@main + needs: + - check-for-yaml + - set-version + if: needs.check-for-yaml.outputs.yaml_changed == 'true' with: - core_yaml_path: Integrations/ESPHome/Core.yaml - firmwares_json: '[{"yaml": "Integrations/ESPHome/TEMP_PRO-1_ETH.yaml", "name": "firmware-e"}, {"yaml": "Integrations/ESPHome/TEMP_PRO-1_W.yaml", "name": "firmware-w"}]' \ No newline at end of file + files: | + Integrations/ESPHome/TEMP_PRO-1_ETH.yaml + esphome-version: stable + combined-name: firmware-e + release-summary: ${{ needs.set-version.outputs.body }} + release-version: ${{ needs.set-version.outputs.version }} + + build-firmware-w: + name: Build And Release (Firmware W) + uses: esphome/workflows/.github/workflows/build.yml@main + needs: + - check-for-yaml + - set-version + if: needs.check-for-yaml.outputs.yaml_changed == 'true' + with: + files: | + Integrations/ESPHome/TEMP_PRO-1_W.yaml + esphome-version: stable + combined-name: firmware-w + release-summary: ${{ needs.set-version.outputs.body }} + release-url: ${{ needs.set-version.outputs.html_url }} + release-version: ${{ needs.set-version.outputs.version }} + + build-site: + name: Build Site + runs-on: ubuntu-latest + needs: + - check-for-yaml + - build-firmware-e + - build-firmware-w + - set-version + if: needs.check-for-yaml.outputs.yaml_changed == 'true' + steps: + - name: Checkout source code + uses: actions/checkout@v4 + + - name: Build + uses: actions/jekyll-build-pages@v1.0.13 + with: + source: ./static + destination: ./output + + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: site + path: output + + publish: + name: Publish to GitHub Pages + runs-on: ubuntu-latest + needs: + - build-site + - build-firmware-e + - build-firmware-w + - set-version + if: needs.check-for-yaml.outputs.yaml_changed == 'true' && ${{ github.run_attempt == 1 }} + permissions: + contents: write + pages: write + id-token: write + steps: + - name: Checkout code + uses: actions/checkout@v3 + + # 1) Download Firmware + - uses: actions/download-artifact@v4 + with: + name: firmware-e + path: firmware-e + + # 2) Download Firmware-B + - uses: actions/download-artifact@v4 + with: + name: firmware-w + path: firmware-w + + # 3) Zip them up + - name: Zip firmware + run: | + zip -r firmware-e.zip firmware-e + zip -r firmware-w.zip firmware-w + + # 4) Upload firmware.zip as an asset + - name: Upload firmware.zip + id: upload-firmware + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + # Use the job-level output from set-version: + upload_url: ${{ needs.set-version.outputs.upload_url }} + asset_path: firmware-e.zip + asset_name: firmware-e.zip + asset_content_type: application/zip + + # 5) Upload firmware-w.zip + - name: Upload firmware-w.zip + id: upload-firmware-w + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + # Use the job-level output from set-version: + upload_url: ${{ needs.set-version.outputs.upload_url }} + asset_path: firmware-w.zip + asset_name: firmware-w.zip + asset_content_type: application/zip + + - name: Copy firmware and manifest + run: |- + mkdir -p output/firmware-e + cp -r firmware-e/${{ needs.build-firmware-e.outputs.version }}/* output/firmware-e/ + + - name: Copy firmware and manifest + run: |- + mkdir -p output/firmware-w + cp -r firmware-w/${{ needs.build-firmware-w.outputs.version }}/* output/firmware-w/ + + - uses: actions/download-artifact@v4 + with: + name: site + path: output + + - uses: actions/upload-pages-artifact@v3 + with: + path: output + retention-days: 1 + + - name: Setup Pages + uses: actions/configure-pages@v5 + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 330a650..410da7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,34 +2,26 @@ name: CI on: pull_request: - -permissions: - # Allow GITHUB_TOKEN to add labels to pull requests - pull-requests: write - issues: write - contents: read - id-token: write - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number }} - cancel-in-progress: true + schedule: + - cron: '0 0 * * 1' jobs: - label-check: - uses: ApolloAutomation/Workflows/.github/workflows/label-check.yml@main ci: - needs: [ label-check ] + name: Building ${{ matrix.file }} + runs-on: ubuntu-latest strategy: - fail-fast: false matrix: file: - - Integrations/ESPHome/TEMP_PRO-1_W.yaml - Integrations/ESPHome/TEMP_PRO-1_ETH.yaml + - Integrations/ESPHome/TEMP_PRO-1_W.yaml esphome-version: - stable - beta - dev - uses: ApolloAutomation/Workflows/.github/workflows/build.yml@main - with: - file: ${{ matrix.file }} - esphome-version: ${{ matrix.esphome-version }} \ No newline at end of file + steps: + - name: Checkout source code + uses: actions/checkout@v4.1.7 + - name: Build ESPHome firmware to verify configuration + uses: esphome/build-action@v6 + with: + yaml-file: ${{ matrix.file }} diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml deleted file mode 100644 index 998e33f..0000000 --- a/.github/workflows/weekly.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Weekly Firmware Build - -on: - schedule: - - cron: '0 0 * * 1' - -permissions: - contents: read - id-token: write - -jobs: - ci: - strategy: - fail-fast: false - matrix: - file: - - Integrations/ESPHome/TEMP_PRO-1_W.yaml - - Integrations/ESPHome/TEMP_PRO-1_ETH.yaml - esphome-version: - - stable - - beta - - dev - uses: ApolloAutomation/Workflows/.github/workflows/build.yml@main - with: - file: ${{ matrix.file }} - esphome-version: ${{ matrix.esphome-version }} - - notify: - name: Notify on Failure - needs: [ ci ] - if: failure() - runs-on: ubuntu-latest - steps: - - name: Send Discord notification - uses: sarisia/actions-status-discord@v1 - with: - webhook: ${{ secrets.DISCORD_WEBHOOK }} - status: ${{ needs.ci.result }} - title: Build Failed - ESPHome Firmware - description: One or more ESPHome firmware builds failed. Check the logs for details. \ No newline at end of file diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 6cc94c3..a5f42c2 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -79,12 +79,13 @@ binary_sensor: - platform: template name: Temperature Within Range id: temp_within_range - lambda: 'return (id(sht_temperature).state <= id(max_temp).state) && (id(sht_temperature).state >= id(min_temp).state);' + lambda: 'bool sht_valid = !isnan(id(sht_temperature).state); bool dallas_valid = !isnan(id(temp_probe).state); bool sht_in_range = !sht_valid || ((id(sht_temperature).state <= id(max_temp).state) && (id(sht_temperature).state >= id(min_temp).state)); bool dallas_in_range = !dallas_valid || ((id(temp_probe).state <= id(max_temp).state) && (id(temp_probe).state >= id(min_temp).state)); return (sht_valid || dallas_valid) && sht_in_range && dallas_in_range;' - platform: template name: Humidity Within Range id: humidity_within_range - lambda: 'return (id(sht_humidity).state <= id(max_humidity).state) && (id(sht_humidity).state >= id(min_humidity).state);' + # Note: If additional humidity sensors are added, expand this logic following the temperature sensor pattern + lambda: 'bool sht_valid = !isnan(id(sht_humidity).state); bool sht_in_range = !sht_valid || ((id(sht_humidity).state <= id(max_humidity).state) && (id(sht_humidity).state >= id(min_humidity).state)); return (sht_valid) && sht_in_range;' - platform: template name: Alarm Active diff --git a/Integrations/ESPHome/TEMP_PRO-1_W.yaml b/Integrations/ESPHome/TEMP_PRO-1_W.yaml index 638e779..a8eff12 100644 --- a/Integrations/ESPHome/TEMP_PRO-1_W.yaml +++ b/Integrations/ESPHome/TEMP_PRO-1_W.yaml @@ -27,6 +27,14 @@ http_request: safe_mode: +improv_serial: + +esp32_improv: + authorizer: none + +web_server: + port: 80 + update: - platform: http_request id: update_http_request @@ -35,12 +43,18 @@ update: logger: +captive_portal: + wifi: + id: wifi_1 + on_connect: + - delay: 5s + - ble.disable: + on_disconnect: + - ble.enable: ap: ssid: "Apollo TEMP_PRO-1 Hotspot" -captive_portal: - script: - id: statusCheck then: From 3443b89d198a9df17b7f068a7d457f05b3c14f8c Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Thu, 15 May 2025 15:48:53 -0400 Subject: [PATCH 14/33] Add Ids --- Integrations/ESPHome/Core.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index a5f42c2..d9c410b 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -9,6 +9,7 @@ esp32: type: esp-idf api: + id: api_server services: - service: play_buzzer variables: @@ -31,11 +32,13 @@ i2c: scl: GPIO17 id: bus_a -web_server: +web_server: + id: webserver port: 80 one_wire: - platform: gpio + id: one_wire_bus pin: GPIO6 # Buzzer @@ -171,14 +174,13 @@ button: - platform: restart icon: mdi:power-cycle name: "ESP Reboot" + id: restart_button - platform: factory_reset disabled_by_default: True name: "Factory Reset ESP" id: factory_reset_all - - number: - platform: template id: min_temp @@ -261,6 +263,7 @@ switch: interval: - interval: 10s + id: alarm_check_interval startup_delay: 10s then: - if: From 663085f3c2c5e848a29534544b1b0184547508f6 Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Thu, 15 May 2025 15:49:44 -0400 Subject: [PATCH 15/33] Update Version --- Integrations/ESPHome/Core.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index d9c410b..d9a6217 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -1,5 +1,5 @@ substitutions: - version: "25.5.14.2" + version: "25.5.15.1" device_description: $TEMP_PRO-1 made by Apollo Automation - version ${version}. esp32: From f4893c3d7aa3421b1c29548548e27d47777f9f68 Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Thu, 15 May 2025 15:53:01 -0400 Subject: [PATCH 16/33] Fix Probe Select --- Integrations/ESPHome/Core.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index d9a6217..ebed0ee 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -131,10 +131,6 @@ sensor: return NAN; } - if (id(temp_probe_select).state == "Food") { - return NAN; - } - return x; light: From cd295642be82eba98780825a1128c86893c6d6e3 Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Thu, 15 May 2025 16:17:09 -0400 Subject: [PATCH 17/33] Delay Until Sensors Set Up --- Integrations/ESPHome/Core.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index ebed0ee..41e76c2 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -260,7 +260,7 @@ switch: interval: - interval: 10s id: alarm_check_interval - startup_delay: 10s + startup_delay: 60s then: - if: condition: From c1668dbf1ce06484d1408f123760d21bb39f722f Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Thu, 15 May 2025 17:09:06 -0400 Subject: [PATCH 18/33] Fix Update URL --- Integrations/ESPHome/Core.yaml | 2 +- Integrations/ESPHome/TEMP_PRO-1_ETH.yaml | 4 ++-- Integrations/ESPHome/TEMP_PRO-1_W.yaml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 41e76c2..fb1fb83 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -1,5 +1,5 @@ substitutions: - version: "25.5.15.1" + version: "25.5.15.2" device_description: $TEMP_PRO-1 made by Apollo Automation - version ${version}. esp32: diff --git a/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml b/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml index 44fe53c..8421909 100644 --- a/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml +++ b/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml @@ -80,11 +80,11 @@ select: lambda: 'return id(firmware_selector).state == "Ethernet";' then: - logger.log: "OTA updates set to use ethernet firmware" - - lambda: id(update_http_request).set_source_url("https://apolloautomation.github.io/TEMP_PROJECT-1/firmware-e/manifest.json"); + - lambda: id(update_http_request).set_source_url("https://apolloautomation.github.io/TEMP_PRO-1/firmware-e/manifest.json"); - component.update: update_http_request else: - logger.log: "OTA updates set to use wifi firmware" - - lambda: id(update_http_request).set_source_url("https://apolloautomation.github.io/TEMP_PROJECT-1/firmware-w/manifest.json"); + - lambda: id(update_http_request).set_source_url("https://apolloautomation.github.io/TEMP_PRO-1/firmware-w/manifest.json"); - component.update: update_http_request packages: diff --git a/Integrations/ESPHome/TEMP_PRO-1_W.yaml b/Integrations/ESPHome/TEMP_PRO-1_W.yaml index a8eff12..77e0409 100644 --- a/Integrations/ESPHome/TEMP_PRO-1_W.yaml +++ b/Integrations/ESPHome/TEMP_PRO-1_W.yaml @@ -111,11 +111,11 @@ select: lambda: 'return id(firmware_selector).state == "Ethernet";' then: - logger.log: "OTA updates set to use ethernet firmware" - - lambda: id(update_http_request).set_source_url("https://apolloautomation.github.io/TEMP_PROJECT-1/firmware-e/manifest.json"); + - lambda: id(update_http_request).set_source_url("https://apolloautomation.github.io/TEMP_PRO-1/firmware-e/manifest.json"); - component.update: update_http_request else: - logger.log: "OTA updates set to use wifi firmware" - - lambda: id(update_http_request).set_source_url("https://apolloautomation.github.io/TEMP_PROJECT-1/firmware-w/manifest.json"); + - lambda: id(update_http_request).set_source_url("https://apolloautomation.github.io/TEMP_PRO-1/firmware-w/manifest.json"); - component.update: update_http_request packages: From ddb23303f9fae65dab6d9f1828281a3661599d12 Mon Sep 17 00:00:00 2001 From: Brandon Harvey <8107750+bharvey88@users.noreply.github.com> Date: Thu, 15 May 2025 17:11:20 -0500 Subject: [PATCH 19/33] Update README.md for temp_pro-1 --- README.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index d68fbe8..cfcfa49 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,26 @@ -# Apollo AIR-1 +# Apollo TEMP_PRO-1 -![Pen no dust](https://github.com/ApolloAutomation/AIR-1/assets/24777085/183af36d-4611-4cb3-af1e-43b84d4d201a) +![temp_pro-1](https://github.com/user-attachments/assets/b9f547fa-b824-4b06-a1f4-70b196adf913) +Key Features of the TEMP_PRO-1 Sensor: -Key Features of the AIR-1 Sensor: +PoE (IEEE 802.3-compliant) or USB-C powered. -MiCS-4514 Below have individual gas % readout: CO, C2H5OH (Alcohol), H2, NO2, and NH3 +Optional Probe addons: -SCD40: CO2 and includes temperature and humidity sensing capabilities. + 1.5m (~5ft) Waterproof Flat Cable (DS18B20) -55°C to 85°C (-67°F to 185°F), ±0.5°C accuracy. Ideal for fridges, freezers, fish tanks etc. + 20cm (~8in) Waterproof Flat Cable (DS18B20) -55°C to 85°C (-67°F to 185°F), ±0.5°C accuracy. + 12.7cm (~5 in) Dust-proof temperature & humidity sensor with waterproof probe (SHT20). -SEN55: Particulate matter (PM1, PM2.5, PM10), VOCs, NOx, humidity, and temperature. +Optional GPIO Header addon and SCD40 CO2 sensor with two mezzanine ports. -DPS310: Barometric air pressure and temperature. +It also includes a Sensirion port for a [SEN55 and SEN6x](https://sensirion.com/products/catalog/SEN55), a [QWIIC port](https://www.sparkfun.com/qwiic), and a [DfRobot port](https://www.dfrobot.com/topic-282.html). Dimensions & Design: -The AIR-1 measures just 61mm x 61mm x 30mm, and we have focused on efficient heat management within this small package to maintain sensor accuracy. This includes a thoughtful PCB layout and case design, incorporating ventilation and strategic component placement. +The TEMP_Pro-1 measures just 92mm x 62mm x 38mm. This includes a thoughtful PCB layout and case design, incorporating ventilation and strategic component placement. Links: \ -Discord (Support/feedback/discussion/future products): [https://discord.gg/8PpS4yUaUh](https://discord.gg/mMNgQPyF94) \ -Shop: [https://apolloautomation.com](https://apolloautomation.com/products/air-1)https://apolloautomation.com/products/air-1 \ -Wiki: [https://wiki.apolloautomation.com](https://wiki.apolloautomation.com/)https://wiki.apolloautomation.com/ +Discord (Support/feedback/discussion/future products): [Click here to join the discord!](https://dsc.gg/apolloautomation) \ +Shop: [https://apolloautomation.com](https://apolloautomation.com/) \ +Wiki: [https://wiki.apolloautomation.com](https://wiki.apolloautomation.com/) From b60eba93573a714200f04ab56caa08ee690938dc Mon Sep 17 00:00:00 2001 From: Chris <1105672+firstof9@users.noreply.github.com> Date: Thu, 15 May 2025 15:41:06 -0700 Subject: [PATCH 20/33] fix: initial_value over max_value --- Integrations/ESPHome/Core.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index fb1fb83..369af2f 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -198,7 +198,7 @@ number: max_value: 100 step: 0.1 unit_of_measurement: '°C' - initial_value: 200 + initial_value: 100 optimistic: true update_interval: never mode: box @@ -277,4 +277,4 @@ text_sensor: name: "OTA URL" id: ota_url entity_category: "diagnostic" - internal: true \ No newline at end of file + internal: true From 409e0be65078a7990e3b652acc5d16c93fa6106f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 May 2025 01:42:05 +0000 Subject: [PATCH 21/33] chore(ci): bump the github-actions group across 1 directory with 3 updates Bumps the github-actions group with 3 updates in the / directory: [pozil/auto-assign-issue](https://github.com/pozil/auto-assign-issue), [actions/checkout](https://github.com/actions/checkout) and [esphome/build-action](https://github.com/esphome/build-action). Updates `pozil/auto-assign-issue` from 1 to 2 - [Release notes](https://github.com/pozil/auto-assign-issue/releases) - [Commits](https://github.com/pozil/auto-assign-issue/compare/v1...v2) Updates `actions/checkout` from 3 to 4 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) Updates `esphome/build-action` from 6 to 7 - [Release notes](https://github.com/esphome/build-action/releases) - [Commits](https://github.com/esphome/build-action/compare/v6...v7) --- updated-dependencies: - dependency-name: pozil/auto-assign-issue dependency-version: '2' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/checkout dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: esphome/build-action dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/autoassign.yml | 2 +- .github/workflows/build.yml | 6 +++--- .github/workflows/ci.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/autoassign.yml b/.github/workflows/autoassign.yml index 0158e68..d5a6557 100644 --- a/.github/workflows/autoassign.yml +++ b/.github/workflows/autoassign.yml @@ -12,7 +12,7 @@ jobs: pull-requests: write steps: - name: 'Auto-assign issue' - uses: pozil/auto-assign-issue@v1 + uses: pozil/auto-assign-issue@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} assignees: TrevorSchirmer diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 98cda17..e4707b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: yaml_changed: ${{ steps.check.outputs.yaml_changed }} steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 2 # So we can diff the previous commit @@ -59,7 +59,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Read version from YAML file id: read_version @@ -160,7 +160,7 @@ jobs: id-token: write steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 # 1) Download Firmware - uses: actions/download-artifact@v4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 410da7b..343ec58 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,8 +20,8 @@ jobs: - dev steps: - name: Checkout source code - uses: actions/checkout@v4.1.7 + uses: actions/checkout@v4 - name: Build ESPHome firmware to verify configuration - uses: esphome/build-action@v6 + uses: esphome/build-action@v7 with: yaml-file: ${{ matrix.file }} From 9dece0f1b189c69d69b2b922066e07965df2ed64 Mon Sep 17 00:00:00 2001 From: Chris <1105672+firstof9@users.noreply.github.com> Date: Fri, 16 May 2025 06:29:37 -0700 Subject: [PATCH 22/33] adjust version --- Integrations/ESPHome/Core.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 369af2f..89cd080 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -1,5 +1,5 @@ substitutions: - version: "25.5.15.2" + version: "25.5.16.1" device_description: $TEMP_PRO-1 made by Apollo Automation - version ${version}. esp32: From 7bb509e2e369777f9b3a2adc66e13cf47d4b135e Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Sun, 1 Jun 2025 15:07:07 -0400 Subject: [PATCH 23/33] Update To Shared Action --- .github/workflows/build.yml | 235 +++------------------------------ .github/workflows/ci.yml | 19 ++- .github/workflows/weekly.yml | 26 ++++ Integrations/ESPHome/Core.yaml | 3 +- 4 files changed, 61 insertions(+), 222 deletions(-) create mode 100644 .github/workflows/weekly.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e4707b5..4c4f8e5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,234 +1,37 @@ -name: Publish -env: - DEVICE_NAME: temp-pro-1 +name: Build and Publish on: push: branches: - main - # Uncomment if needed: - # workflow_dispatch: - # inputs: - # version: - # description: 'The version of the firmware to build' - # required: true + workflow_dispatch: + inputs: + bypass-yaml-check: + description: 'Bypass YAML change check (force build/publish)' + type: boolean + required: false + default: false # release: # types: [published] jobs: - check-for-yaml: - name: Check for YAML Changes - runs-on: ubuntu-latest - outputs: - yaml_changed: ${{ steps.check.outputs.yaml_changed }} - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 2 # So we can diff the previous commit - - - name: Find .yaml Changes in Last PR Merge - id: check - run: | - BASE_COMMIT=$(git rev-parse HEAD^1) - MERGE_COMMIT=$(git rev-parse HEAD) - - if git diff --name-only $BASE_COMMIT $MERGE_COMMIT | grep -q '\.yaml$'; then - echo "yaml_changed=true" >> $GITHUB_OUTPUT - else - echo "yaml_changed=false" >> $GITHUB_OUTPUT - fi - - set-version: - name: Set Version - runs-on: ubuntu-latest - needs: [check-for-yaml] - if: needs.check-for-yaml.outputs.yaml_changed == 'true' - - # Expose job-level outputs so other jobs can access them - outputs: - version: ${{ steps.read_version.outputs.version }} - upload_url: ${{ steps.run-release-drafter.outputs.upload_url }} - body: ${{ steps.run-release-drafter.outputs.body }} - html_url: ${{ steps.run-release-drafter.outputs.html_url }} + build-and-publish: + uses: ApolloAutomation/Workflows/.github/workflows/build.yml@main permissions: contents: write pages: write id-token: write pull-requests: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Read version from YAML file - id: read_version - run: | - version=$(awk '/substitutions:/ {found=1} found && /version:/ {print $2; exit}' Integrations/ESPHome/Core.yaml | tr -d '"') - echo "version=$version" >> $GITHUB_OUTPUT - echo "Detected version: $version" - - - name: Fetch Last Merged PR Body - id: last_pr - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - PR_INFO=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \ - "https://api.github.com/repos/${{ github.repository }}/pulls?state=closed&sort=updated&direction=desc&per_page=1") - PR_BODY=$(echo "$PR_INFO" | jq -r '.[0].body') - echo "$PR_BODY" > pr_body.txt - - - name: 🚀 Run Release Drafter - id: run-release-drafter - uses: release-drafter/release-drafter@v6 - with: - version: ${{ steps.read_version.outputs.version }} - publish: true - tag: ${{ steps.read_version.outputs.version }} - name: Release ${{ steps.read_version.outputs.version }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - build-firmware-e: - name: Build And Release (Firmware) - uses: esphome/workflows/.github/workflows/build.yml@main - needs: - - check-for-yaml - - set-version - if: needs.check-for-yaml.outputs.yaml_changed == 'true' with: - files: | + device-name: temp-pro-1 + yaml-files: | Integrations/ESPHome/TEMP_PRO-1_ETH.yaml - esphome-version: stable - combined-name: firmware-e - release-summary: ${{ needs.set-version.outputs.body }} - release-version: ${{ needs.set-version.outputs.version }} - - build-firmware-w: - name: Build And Release (Firmware W) - uses: esphome/workflows/.github/workflows/build.yml@main - needs: - - check-for-yaml - - set-version - if: needs.check-for-yaml.outputs.yaml_changed == 'true' - with: - files: | Integrations/ESPHome/TEMP_PRO-1_W.yaml + firmware-names: "_ETH:firmware-e,_W:firmware-w" + core-yaml-path: Integrations/ESPHome/Core.yaml esphome-version: stable - combined-name: firmware-w - release-summary: ${{ needs.set-version.outputs.body }} - release-url: ${{ needs.set-version.outputs.html_url }} - release-version: ${{ needs.set-version.outputs.version }} - - build-site: - name: Build Site - runs-on: ubuntu-latest - needs: - - check-for-yaml - - build-firmware-e - - build-firmware-w - - set-version - if: needs.check-for-yaml.outputs.yaml_changed == 'true' - steps: - - name: Checkout source code - uses: actions/checkout@v4 - - - name: Build - uses: actions/jekyll-build-pages@v1.0.13 - with: - source: ./static - destination: ./output - - - name: Upload - uses: actions/upload-artifact@v4 - with: - name: site - path: output - - publish: - name: Publish to GitHub Pages - runs-on: ubuntu-latest - needs: - - build-site - - build-firmware-e - - build-firmware-w - - set-version - if: needs.check-for-yaml.outputs.yaml_changed == 'true' && ${{ github.run_attempt == 1 }} - permissions: - contents: write - pages: write - id-token: write - steps: - - name: Checkout code - uses: actions/checkout@v4 - - # 1) Download Firmware - - uses: actions/download-artifact@v4 - with: - name: firmware-e - path: firmware-e - - # 2) Download Firmware-B - - uses: actions/download-artifact@v4 - with: - name: firmware-w - path: firmware-w - - # 3) Zip them up - - name: Zip firmware - run: | - zip -r firmware-e.zip firmware-e - zip -r firmware-w.zip firmware-w - - # 4) Upload firmware.zip as an asset - - name: Upload firmware.zip - id: upload-firmware - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - # Use the job-level output from set-version: - upload_url: ${{ needs.set-version.outputs.upload_url }} - asset_path: firmware-e.zip - asset_name: firmware-e.zip - asset_content_type: application/zip - - # 5) Upload firmware-w.zip - - name: Upload firmware-w.zip - id: upload-firmware-w - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - # Use the job-level output from set-version: - upload_url: ${{ needs.set-version.outputs.upload_url }} - asset_path: firmware-w.zip - asset_name: firmware-w.zip - asset_content_type: application/zip - - - name: Copy firmware and manifest - run: |- - mkdir -p output/firmware-e - cp -r firmware-e/${{ needs.build-firmware-e.outputs.version }}/* output/firmware-e/ - - - name: Copy firmware and manifest - run: |- - mkdir -p output/firmware-w - cp -r firmware-w/${{ needs.build-firmware-w.outputs.version }}/* output/firmware-w/ - - - uses: actions/download-artifact@v4 - with: - name: site - path: output - - - uses: actions/upload-pages-artifact@v3 - with: - path: output - retention-days: 1 - - - name: Setup Pages - uses: actions/configure-pages@v5 - - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 \ No newline at end of file + # Bypass check if manually triggered with bypass option + check-yaml-changes: ${{ !(github.event_name == 'workflow_dispatch' && github.event.inputs.bypass-yaml-check == 'true') }} + publish-to-pages: true + has-installer: true + installer-path: static \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 343ec58..7d34cb7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,10 +2,19 @@ name: CI on: pull_request: - schedule: - - cron: '0 0 * * 1' + +permissions: + # Allow GITHUB_TOKEN to add labels to pull requests + pull-requests: write + issues: write + contents: read + id-token: write jobs: + label-check: + name: Label Check + uses: ApolloAutomation/Workflows/.github/workflows/label-check.yml@main + ci: name: Building ${{ matrix.file }} runs-on: ubuntu-latest @@ -20,8 +29,8 @@ jobs: - dev steps: - name: Checkout source code - uses: actions/checkout@v4 + uses: actions/checkout@v4.1.7 - name: Build ESPHome firmware to verify configuration - uses: esphome/build-action@v7 + uses: esphome/build-action@v6 with: - yaml-file: ${{ matrix.file }} + yaml-file: ${{ matrix.file }} \ No newline at end of file diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml new file mode 100644 index 0000000..6b532b6 --- /dev/null +++ b/.github/workflows/weekly.yml @@ -0,0 +1,26 @@ +name: Weekly Firmware Build + +on: + schedule: + - cron: '0 0 * * 1' + +jobs: + build: + name: Building ${{ matrix.file }} + runs-on: ubuntu-latest + strategy: + matrix: + file: + - Integrations/ESPHome/TEMP_PRO-1_ETH.yaml + - Integrations/ESPHome/TEMP_PRO-1_W.yaml + esphome-version: + - stable + - beta + - dev + steps: + - name: Checkout source code + uses: actions/checkout@v4.1.7 + - name: Build ESPHome firmware to verify configuration + uses: esphome/build-action@v6 + with: + yaml-file: ${{ matrix.file }} \ No newline at end of file diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index fb1fb83..166c455 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -1,10 +1,11 @@ substitutions: - version: "25.5.15.2" + version: "25.6.1.1" device_description: $TEMP_PRO-1 made by Apollo Automation - version ${version}. esp32: board: esp32-s3-devkitc-1 variant: esp32s3 + flash_size: 8MB framework: type: esp-idf From 8d13e3148bae7176ea4889cdaef660e12c481140 Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Sun, 1 Jun 2025 15:41:42 -0400 Subject: [PATCH 24/33] Start On Battery --- Integrations/ESPHome/Battery.yaml | 52 +++++++++++++++++++ Integrations/ESPHome/Core.yaml | 63 ++++++++++++++++++++++++ Integrations/ESPHome/TEMP_PRO-1_ETH.yaml | 15 ++++++ Integrations/ESPHome/TEMP_PRO-1_W.yaml | 15 ++++++ 4 files changed, 145 insertions(+) create mode 100644 Integrations/ESPHome/Battery.yaml diff --git a/Integrations/ESPHome/Battery.yaml b/Integrations/ESPHome/Battery.yaml new file mode 100644 index 0000000..0540dc9 --- /dev/null +++ b/Integrations/ESPHome/Battery.yaml @@ -0,0 +1,52 @@ +external_components: + - source: github://ApolloAutomation/esphome-battery-component + components: [max17048] #Forked OptionZero + +deep_sleep: + id: deep_sleep_1 + sleep_duration: 12h + run_duration: 90s + +sensor: + - platform: max17048 + id: max_17048 + battery_voltage: + name: Battery voltage + id: batt_v + battery_level: + name: Battery level + id: batt_pct + filters: + - lambda: | + if (x > 100) return 100; + else return (x); + +number: + - platform: template + name: "Sleep Duration" + id: deep_sleep_sleep_duration + min_value: 0 + max_value: 800 + step: 1 + mode: box + update_interval: never + optimistic: true + restore_value: true + initial_value: 12 + icon: "mdi:arrow-collapse-right" + entity_category: CONFIG + unit_of_measurement: "h" + on_value: + then: + - lambda: |- + id(deep_sleep_1).set_sleep_duration(x * 60 * 60 * 1000); + +script: + - id: reportAllValues + then: + - component.update: temp_probe + - component.update: sht30 + - component.update: sys_esp_temperature + - component.update: sys_uptime + - component.update: max_17048 + - script.execute: alarm_script \ No newline at end of file diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 166c455..99842df 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -18,6 +18,27 @@ api: then: - rtttl.play: rtttl: !lambda 'return song_str;' + reboot_timeout: 0s + on_client_connected: + then: + - delay: 5s + - 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 Or Switch"); + id(deep_sleep_1).prevent_deep_sleep(); + else: + - switch.turn_on: accessory_power + - delay: 10s + - lambda: |- + id(reportAllValues).execute(); + - delay: 5s + - deep_sleep.enter: + id: deep_sleep_1 globals: - id: cycleCounter type: int @@ -99,6 +120,23 @@ binary_sensor: then: - light.turn_off: rgb_light + - platform: homeassistant + name: "OTA Mode" + id: ota_mode + entity_id: input_boolean.apollo_ota_mode + on_press: + then: + - lambda: |- + id(deep_sleep_1).prevent_deep_sleep(); + on_release: + then: + - if: + condition: + switch.is_off: prevent_sleep + then: + - lambda: |- + id(deep_sleep_1).allow_deep_sleep(); + sensor: - platform: internal_temperature name: "ESP Temperature" @@ -111,6 +149,7 @@ sensor: update_interval: 60s - platform: sht3xd + id: sht30 temperature: name: "SHT Temperature" id: sht_temperature @@ -257,11 +296,35 @@ switch: id: alarm_outside_humidity_range optimistic: true restore_mode: RESTORE_DEFAULT_OFF + + - platform: template + name: "Prevent Sleep" + id: prevent_sleep + icon: mdi:sleep + restore_mode: RESTORE_DEFAULT_ON + optimistic: true + entity_category: "config" + on_turn_on: + then: + - lambda: |- + id(deep_sleep_1).prevent_deep_sleep(); + on_turn_off: + then: + - if: + condition: + binary_sensor.is_off: ota_mode + then: + - lambda: |- + id(deep_sleep_1).allow_deep_sleep(); interval: - interval: 10s id: alarm_check_interval startup_delay: 60s + then: + - script.execute: alarm_script +script: + - id: alarm_script then: - if: condition: diff --git a/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml b/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml index 8421909..8d89710 100644 --- a/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml +++ b/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml @@ -11,6 +11,20 @@ esphome: version: "${version}" min_version: 2025.2.0 + on_boot: + - priority: 500 + then: + - lambda: |- + 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(); dashboard_import: package_import_url: github://ApolloAutomation/TEMP_PRO-1/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml @@ -89,3 +103,4 @@ select: packages: core: !include Core.yaml + battery: !include Battery.yaml diff --git a/Integrations/ESPHome/TEMP_PRO-1_W.yaml b/Integrations/ESPHome/TEMP_PRO-1_W.yaml index 77e0409..78b2175 100644 --- a/Integrations/ESPHome/TEMP_PRO-1_W.yaml +++ b/Integrations/ESPHome/TEMP_PRO-1_W.yaml @@ -11,6 +11,20 @@ esphome: version: "${version}" min_version: 2025.2.0 + on_boot: + - priority: 500 + then: + - lambda: |- + 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(); dashboard_import: package_import_url: github://ApolloAutomation/TEMP_PRO-1/Integrations/ESPHome/TEMP_PRO-1_W.yaml @@ -120,3 +134,4 @@ select: packages: core: !include Core.yaml + battery: !include Battery.yaml From bbbed516d3eb04d9b81de086ad4b2ae25bcb1d16 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 00:52:29 +0000 Subject: [PATCH 25/33] chore(ci): bump the github-actions group with 2 updates Bumps the github-actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [esphome/build-action](https://github.com/esphome/build-action). Updates `actions/checkout` from 4.1.7 to 4.2.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4.1.7...v4.2.2) Updates `esphome/build-action` from 6 to 7 - [Release notes](https://github.com/esphome/build-action/releases) - [Commits](https://github.com/esphome/build-action/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 4.2.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: esphome/build-action dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 4 ++-- .github/workflows/weekly.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d34cb7..cf36d91 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,8 +29,8 @@ jobs: - dev steps: - name: Checkout source code - uses: actions/checkout@v4.1.7 + uses: actions/checkout@v4.2.2 - name: Build ESPHome firmware to verify configuration - uses: esphome/build-action@v6 + uses: esphome/build-action@v7 with: yaml-file: ${{ matrix.file }} \ No newline at end of file diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml index 6b532b6..1b26ba3 100644 --- a/.github/workflows/weekly.yml +++ b/.github/workflows/weekly.yml @@ -19,8 +19,8 @@ jobs: - dev steps: - name: Checkout source code - uses: actions/checkout@v4.1.7 + uses: actions/checkout@v4.2.2 - name: Build ESPHome firmware to verify configuration - uses: esphome/build-action@v6 + uses: esphome/build-action@v7 with: yaml-file: ${{ matrix.file }} \ No newline at end of file From 4e69e2b338f7f64f1930059c9954230c0222571e Mon Sep 17 00:00:00 2001 From: Trevor Schirmer <24777085+TrevorSchirmer@users.noreply.github.com> Date: Mon, 2 Jun 2025 09:39:10 -0400 Subject: [PATCH 26/33] Update Core.yaml --- Integrations/ESPHome/Core.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 89cd080..32af02d 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -1,5 +1,5 @@ substitutions: - version: "25.5.16.1" + version: "25.6.2.1" device_description: $TEMP_PRO-1 made by Apollo Automation - version ${version}. esp32: From e7443b74de34dff1872a709a9a5daf38a4165ce6 Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Tue, 10 Jun 2025 13:42:56 -0400 Subject: [PATCH 27/33] Remove Template --- PULL_REQUEST_TEMPLATE.md | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 PULL_REQUEST_TEMPLATE.md diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 5f6a192..0000000 --- a/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,13 +0,0 @@ -Version: - -Adds: - -Fixes: - -Breaks: - - - -Checks: -- [ ] Documentation Updated -- [ ] Build Number Incremented In Core.yaml From c9585fdc4314c79684cf7c0b142f71c29d792317 Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Tue, 10 Jun 2025 13:59:42 -0400 Subject: [PATCH 28/33] Version Bump --- Integrations/ESPHome/Core.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 99842df..e918b4c 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -1,5 +1,5 @@ substitutions: - version: "25.6.1.1" + version: "25.6.10.1" device_description: $TEMP_PRO-1 made by Apollo Automation - version ${version}. esp32: From 0356cf1e9bf4415a2866ad3cb3623ec0339fc1aa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 09:19:53 +0000 Subject: [PATCH 29/33] chore(ci): bump actions/checkout in the github-actions group Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.2.2 to 5.0.0 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4.2.2...v5.0.0) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/weekly.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf36d91..ca7bebe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: - dev steps: - name: Checkout source code - uses: actions/checkout@v4.2.2 + uses: actions/checkout@v5.0.0 - name: Build ESPHome firmware to verify configuration uses: esphome/build-action@v7 with: diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml index 1b26ba3..9d4e814 100644 --- a/.github/workflows/weekly.yml +++ b/.github/workflows/weekly.yml @@ -19,7 +19,7 @@ jobs: - dev steps: - name: Checkout source code - uses: actions/checkout@v4.2.2 + uses: actions/checkout@v5.0.0 - name: Build ESPHome firmware to verify configuration uses: esphome/build-action@v7 with: From 4683964874352f075cf014128521d8787ce1d960 Mon Sep 17 00:00:00 2001 From: Brandon Harvey <8107750+bharvey88@users.noreply.github.com> Date: Thu, 18 Dec 2025 15:19:07 -0600 Subject: [PATCH 30/33] Change auto-assign assignee from TrevorSchirmer to bharvey88 --- .github/workflows/autoassign.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autoassign.yml b/.github/workflows/autoassign.yml index d5a6557..604d6d5 100644 --- a/.github/workflows/autoassign.yml +++ b/.github/workflows/autoassign.yml @@ -15,5 +15,5 @@ jobs: uses: pozil/auto-assign-issue@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - assignees: TrevorSchirmer + assignees: bharvey88 numOfAssignee: 1 From 75ecab64b5a314bc7b4f02f0899e6016e52b8020 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Jan 2026 00:15:22 +0000 Subject: [PATCH 31/33] chore(ci): bump actions/checkout in the github-actions group Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 5.0.0 to 6.0.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5.0.0...v6.0.2) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.2 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/weekly.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca7bebe..b718d08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: - dev steps: - name: Checkout source code - uses: actions/checkout@v5.0.0 + uses: actions/checkout@v6.0.2 - name: Build ESPHome firmware to verify configuration uses: esphome/build-action@v7 with: diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml index 9d4e814..0d5a862 100644 --- a/.github/workflows/weekly.yml +++ b/.github/workflows/weekly.yml @@ -19,7 +19,7 @@ jobs: - dev steps: - name: Checkout source code - uses: actions/checkout@v5.0.0 + uses: actions/checkout@v6.0.2 - name: Build ESPHome firmware to verify configuration uses: esphome/build-action@v7 with: From 5a27f46dd2a7c6c0cea9d4cb65b6d611aee2e55e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 00:25:52 +0000 Subject: [PATCH 32/33] chore(ci): bump pozil/auto-assign-issue in the github-actions group Bumps the github-actions group with 1 update: [pozil/auto-assign-issue](https://github.com/pozil/auto-assign-issue). Updates `pozil/auto-assign-issue` from 2 to 3 - [Release notes](https://github.com/pozil/auto-assign-issue/releases) - [Commits](https://github.com/pozil/auto-assign-issue/compare/v2...v3) --- updated-dependencies: - dependency-name: pozil/auto-assign-issue dependency-version: '3' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/autoassign.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autoassign.yml b/.github/workflows/autoassign.yml index 604d6d5..af141fc 100644 --- a/.github/workflows/autoassign.yml +++ b/.github/workflows/autoassign.yml @@ -12,7 +12,7 @@ jobs: pull-requests: write steps: - name: 'Auto-assign issue' - uses: pozil/auto-assign-issue@v2 + uses: pozil/auto-assign-issue@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} assignees: bharvey88 From 4d4aee01bed734210aa16f6bef0af989d70fff3d Mon Sep 17 00:00:00 2001 From: Trevor Schirmer Date: Tue, 7 Jul 2026 11:34:20 -0400 Subject: [PATCH 33/33] Fix ESPHome dev build: use on_value trigger variable instead of Select .state ESPHome removed the deprecated std::string state member from select entities on the dev branch (deprecated 2026.1.0, removal 2026.7.0), which broke the CI dev-channel build: 'class esphome::template_::TemplateSelect<...>' has no member named 'state' Inside the select's own on_value trigger the selected option is available as the trigger variable x, which works on every ESPHome version back to this config's min_version of 2025.2.0 (std::string on older releases, StringRef on dev - both compare against string literals). Runtime behavior is unchanged. Co-Authored-By: Claude Fable 5 --- Integrations/ESPHome/Core.yaml | 2 +- Integrations/ESPHome/TEMP_PRO-1_ETH.yaml | 2 +- Integrations/ESPHome/TEMP_PRO-1_W.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index 9dd3807..3c1f539 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -1,5 +1,5 @@ substitutions: - version: "25.6.10.1" + version: "26.7.7.1" device_description: $TEMP_PRO-1 made by Apollo Automation - version ${version}. esp32: diff --git a/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml b/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml index 8d89710..adc05de 100644 --- a/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml +++ b/Integrations/ESPHome/TEMP_PRO-1_ETH.yaml @@ -91,7 +91,7 @@ select: then: - if: condition: - lambda: 'return id(firmware_selector).state == "Ethernet";' + lambda: 'return x == "Ethernet";' then: - logger.log: "OTA updates set to use ethernet firmware" - lambda: id(update_http_request).set_source_url("https://apolloautomation.github.io/TEMP_PRO-1/firmware-e/manifest.json"); diff --git a/Integrations/ESPHome/TEMP_PRO-1_W.yaml b/Integrations/ESPHome/TEMP_PRO-1_W.yaml index 78b2175..1612e25 100644 --- a/Integrations/ESPHome/TEMP_PRO-1_W.yaml +++ b/Integrations/ESPHome/TEMP_PRO-1_W.yaml @@ -122,7 +122,7 @@ select: then: - if: condition: - lambda: 'return id(firmware_selector).state == "Ethernet";' + lambda: 'return x == "Ethernet";' then: - logger.log: "OTA updates set to use ethernet firmware" - lambda: id(update_http_request).set_source_url("https://apolloautomation.github.io/TEMP_PRO-1/firmware-e/manifest.json");