Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: ApolloAutomation/Workflows/.github/workflows/label-check.yml@main

ci:
name: Building ${{ matrix.file }}
name: Building ${{ matrix.file }} / ESPHome ${{ matrix.esphome-version }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
build:
name: Building ${{ matrix.file }}
name: Building ${{ matrix.file }} / ESPHome ${{ matrix.esphome-version }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down
19 changes: 16 additions & 3 deletions Integrations/ESPHome/Core.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
substitutions:
version: "25.6.29.1"
version: "25.7.8.1"

esp32:
board: esp32-s3-devkitc-1
Expand Down Expand Up @@ -406,8 +406,7 @@ sensor:
id: scd40_humidity
disabled_by_default: true
filters:
- lambda: return x - id(scd40_humidity_offset).state;
automatic_self_calibration: false
- lambda: return x - id(scd40_humidity_offset).state;
update_interval: 60s
measurement_mode: "periodic"
i2c_id: bus_a
Expand Down Expand Up @@ -706,6 +705,19 @@ switch:
optimistic: true
entity_category: "config"

- platform: template
name: "SCD40 Automatic Self Calibration"
id: scd40_auto_self_calibration
icon: mdi:tune
restore_mode: RESTORE_DEFAULT_ON
disabled_by_default: true
optimistic: true
entity_category: "config"
on_turn_on:
- lambda: 'id(scd40).set_automatic_self_calibration(true);'
on_turn_off:
- lambda: 'id(scd40).set_automatic_self_calibration(false);'

text_sensor:
- platform: ld2450
ld2450_id: ld2450_radar
Expand Down Expand Up @@ -787,6 +799,7 @@ script:
then:
- lambda: "id(runTest) = false;"
- lambda: "id(testCycleCount) = 0;"
- delay: 2s
- while:
condition:
- lambda: "return id(testCycleCount) < 5;"
Expand Down
17 changes: 17 additions & 0 deletions Integrations/ESPHome/R_PRO-1_ETH.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,23 @@ esphome:
version: ${version}

min_version: 2024.6.4
on_boot:
- priority: 800
then:
- if:
condition:
- lambda: "return id(runTest);"
then:
- lambda: "id(testScript).execute();"
# Check and apply SCD40 auto self-calibration setting
- lambda: |-
if (id(scd40_auto_self_calibration).state) {
id(scd40).set_automatic_self_calibration(true);
ESP_LOGI("scd40", "Automatic self-calibration enabled on boot");
} else {
id(scd40).set_automatic_self_calibration(false);
ESP_LOGI("scd40", "Automatic self-calibration disabled on boot");
}

dashboard_import:
package_import_url: github://ApolloAutomation/R_PRO-1/Integrations/ESPHome/R_PRO-1_ETH.yaml
Expand Down
16 changes: 16 additions & 0 deletions Integrations/ESPHome/R_PRO-1_W.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ esphome:
version: ${version}

min_version: 2024.6.4
on_boot:
- priority: 800
then:
- if:
condition:
- lambda: "return id(runTest);"
then:
- lambda: "id(testScript).execute();"
- lambda: |-
if (id(scd40_auto_self_calibration).state) {
id(scd40).set_automatic_self_calibration(true);
ESP_LOGI("scd40", "Automatic self-calibration enabled on boot");
} else {
id(scd40).set_automatic_self_calibration(false);
ESP_LOGI("scd40", "Automatic self-calibration disabled on boot");
}

dashboard_import:
package_import_url: github://ApolloAutomation/R-1/Integrations/ESPHome/R_PRO-1_W.yaml
Expand Down