From 68dbf35b096be83e46e3fc7e82ae3100d2866ac2 Mon Sep 17 00:00:00 2001 From: Oliver Hihn <43825356+oliverhihn@users.noreply.github.com> Date: Wed, 12 Jun 2024 20:14:03 +0200 Subject: [PATCH 01/11] X9C step delay with units (#6898) --- esphome/components/x9c/output.py | 8 +++++++- tests/components/x9c/test.esp32-c3-idf.yaml | 2 +- tests/components/x9c/test.esp32-c3.yaml | 2 +- tests/components/x9c/test.esp32-idf.yaml | 2 +- tests/components/x9c/test.esp32.yaml | 2 +- tests/components/x9c/test.esp8266.yaml | 2 +- tests/components/x9c/test.rp2040.yaml | 2 +- 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/esphome/components/x9c/output.py b/esphome/components/x9c/output.py index 56820efdfa..4497994982 100644 --- a/esphome/components/x9c/output.py +++ b/esphome/components/x9c/output.py @@ -27,7 +27,13 @@ CONFIG_SCHEMA = cv.All( cv.Optional(CONF_INITIAL_VALUE, default=1.0): cv.float_range( min=0.01, max=1.0 ), - cv.Optional(CONF_STEP_DELAY, default=1): cv.int_range(min=1, max=100), + cv.Optional(CONF_STEP_DELAY, default="1us"): cv.All( + cv.positive_time_period_microseconds, + cv.Range( + min=cv.TimePeriod(microseconds=1), + max=cv.TimePeriod(microseconds=100), + ), + ), } ) ) diff --git a/tests/components/x9c/test.esp32-c3-idf.yaml b/tests/components/x9c/test.esp32-c3-idf.yaml index 1234581329..972c743fcd 100644 --- a/tests/components/x9c/test.esp32-c3-idf.yaml +++ b/tests/components/x9c/test.esp32-c3-idf.yaml @@ -5,4 +5,4 @@ output: inc_pin: 4 ud_pin: 5 initial_value: 0.5 - step_delay: 50 + step_delay: 50us diff --git a/tests/components/x9c/test.esp32-c3.yaml b/tests/components/x9c/test.esp32-c3.yaml index 1234581329..972c743fcd 100644 --- a/tests/components/x9c/test.esp32-c3.yaml +++ b/tests/components/x9c/test.esp32-c3.yaml @@ -5,4 +5,4 @@ output: inc_pin: 4 ud_pin: 5 initial_value: 0.5 - step_delay: 50 + step_delay: 50us diff --git a/tests/components/x9c/test.esp32-idf.yaml b/tests/components/x9c/test.esp32-idf.yaml index 5f1468e94b..f587b69b4f 100644 --- a/tests/components/x9c/test.esp32-idf.yaml +++ b/tests/components/x9c/test.esp32-idf.yaml @@ -5,4 +5,4 @@ output: inc_pin: 14 ud_pin: 15 initial_value: 0.5 - step_delay: 50 + step_delay: 50us diff --git a/tests/components/x9c/test.esp32.yaml b/tests/components/x9c/test.esp32.yaml index 5f1468e94b..f587b69b4f 100644 --- a/tests/components/x9c/test.esp32.yaml +++ b/tests/components/x9c/test.esp32.yaml @@ -5,4 +5,4 @@ output: inc_pin: 14 ud_pin: 15 initial_value: 0.5 - step_delay: 50 + step_delay: 50us diff --git a/tests/components/x9c/test.esp8266.yaml b/tests/components/x9c/test.esp8266.yaml index 5f1468e94b..f587b69b4f 100644 --- a/tests/components/x9c/test.esp8266.yaml +++ b/tests/components/x9c/test.esp8266.yaml @@ -5,4 +5,4 @@ output: inc_pin: 14 ud_pin: 15 initial_value: 0.5 - step_delay: 50 + step_delay: 50us diff --git a/tests/components/x9c/test.rp2040.yaml b/tests/components/x9c/test.rp2040.yaml index 1234581329..972c743fcd 100644 --- a/tests/components/x9c/test.rp2040.yaml +++ b/tests/components/x9c/test.rp2040.yaml @@ -5,4 +5,4 @@ output: inc_pin: 4 ud_pin: 5 initial_value: 0.5 - step_delay: 50 + step_delay: 50us From 8453d9a70da397baac09a1b3a158b6d88f27e2ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Jun 2024 09:27:15 +1200 Subject: [PATCH 02/11] Bump actions/checkout from 4.1.6 to 4.1.7 (#6900) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci-api-proto.yml | 2 +- .github/workflows/ci-docker.yml | 2 +- .github/workflows/ci.yml | 32 +++++++++++------------ .github/workflows/release.yml | 8 +++--- .github/workflows/sync-device-classes.yml | 4 +-- .github/workflows/yaml-lint.yml | 2 +- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci-api-proto.yml b/.github/workflows/ci-api-proto.yml index 1628464061..ee08a0246d 100644 --- a/.github/workflows/ci-api-proto.yml +++ b/.github/workflows/ci-api-proto.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Set up Python uses: actions/setup-python@v5.1.0 with: diff --git a/.github/workflows/ci-docker.yml b/.github/workflows/ci-docker.yml index dd5c051cfb..421a885f74 100644 --- a/.github/workflows/ci-docker.yml +++ b/.github/workflows/ci-docker.yml @@ -40,7 +40,7 @@ jobs: arch: [amd64, armv7, aarch64] build_type: ["ha-addon", "docker", "lint"] steps: - - uses: actions/checkout@v4.1.6 + - uses: actions/checkout@v4.1.7 - name: Set up Python uses: actions/setup-python@v5.1.0 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b49237db26..3c10e5dac7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: cache-key: ${{ steps.cache-key.outputs.key }} steps: - name: Check out code from GitHub - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Generate cache-key id: cache-key run: echo key="${{ hashFiles('requirements.txt', 'requirements_optional.txt', 'requirements_test.txt') }}" >> $GITHUB_OUTPUT @@ -66,7 +66,7 @@ jobs: - common steps: - name: Check out code from GitHub - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Restore Python uses: ./.github/actions/restore-python with: @@ -87,7 +87,7 @@ jobs: - common steps: - name: Check out code from GitHub - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Restore Python uses: ./.github/actions/restore-python with: @@ -108,7 +108,7 @@ jobs: - common steps: - name: Check out code from GitHub - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Restore Python uses: ./.github/actions/restore-python with: @@ -129,7 +129,7 @@ jobs: - common steps: - name: Check out code from GitHub - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Restore Python uses: ./.github/actions/restore-python with: @@ -150,7 +150,7 @@ jobs: - common steps: - name: Check out code from GitHub - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Restore Python uses: ./.github/actions/restore-python with: @@ -199,7 +199,7 @@ jobs: - common steps: - name: Check out code from GitHub - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Restore Python uses: ./.github/actions/restore-python with: @@ -229,7 +229,7 @@ jobs: - common steps: - name: Check out code from GitHub - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Restore Python uses: ./.github/actions/restore-python with: @@ -254,7 +254,7 @@ jobs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: Check out code from GitHub - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Find all YAML test files id: set-matrix run: echo "matrix=$(ls tests/test*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT @@ -271,7 +271,7 @@ jobs: file: ${{ fromJson(needs.compile-tests-list.outputs.matrix) }} steps: - name: Check out code from GitHub - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Restore Python uses: ./.github/actions/restore-python with: @@ -303,7 +303,7 @@ jobs: file: ${{ fromJson(needs.compile-tests-list.outputs.matrix) }} steps: - name: Check out code from GitHub - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Restore Python uses: ./.github/actions/restore-python with: @@ -358,7 +358,7 @@ jobs: steps: - name: Check out code from GitHub - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Restore Python uses: ./.github/actions/restore-python with: @@ -410,7 +410,7 @@ jobs: count: ${{ steps.list-components.outputs.count }} steps: - name: Check out code from GitHub - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 with: # Fetch enough history so `git merge-base refs/remotes/origin/dev HEAD` works. fetch-depth: 500 @@ -458,7 +458,7 @@ jobs: run: sudo apt-get install libsodium-dev libsdl2-dev - name: Check out code from GitHub - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Restore Python uses: ./.github/actions/restore-python with: @@ -484,7 +484,7 @@ jobs: matrix: ${{ steps.split.outputs.components }} steps: - name: Check out code from GitHub - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Split components into 20 groups id: split run: | @@ -512,7 +512,7 @@ jobs: run: sudo apt-get install libsodium-dev libsdl2-dev - name: Check out code from GitHub - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Restore Python uses: ./.github/actions/restore-python with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 563d485b6a..9c07335104 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: tag: ${{ steps.tag.outputs.tag }} branch_build: ${{ steps.tag.outputs.branch_build }} steps: - - uses: actions/checkout@v4.1.6 + - uses: actions/checkout@v4.1.7 - name: Get tag id: tag # yamllint disable rule:line-length @@ -51,7 +51,7 @@ jobs: contents: read id-token: write steps: - - uses: actions/checkout@v4.1.6 + - uses: actions/checkout@v4.1.7 - name: Set up Python uses: actions/setup-python@v5.1.0 with: @@ -83,7 +83,7 @@ jobs: - linux/arm/v7 - linux/arm64 steps: - - uses: actions/checkout@v4.1.6 + - uses: actions/checkout@v4.1.7 - name: Set up Python uses: actions/setup-python@v5.1.0 with: @@ -174,7 +174,7 @@ jobs: - ghcr - dockerhub steps: - - uses: actions/checkout@v4.1.6 + - uses: actions/checkout@v4.1.7 - name: Download digests uses: actions/download-artifact@v4.1.7 diff --git a/.github/workflows/sync-device-classes.yml b/.github/workflows/sync-device-classes.yml index e65e851f3c..45f6b27127 100644 --- a/.github/workflows/sync-device-classes.yml +++ b/.github/workflows/sync-device-classes.yml @@ -13,10 +13,10 @@ jobs: if: github.repository == 'esphome/esphome' steps: - name: Checkout - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Checkout Home Assistant - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 with: repository: home-assistant/core path: lib/home-assistant diff --git a/.github/workflows/yaml-lint.yml b/.github/workflows/yaml-lint.yml index f009643629..1c0b5f58ad 100644 --- a/.github/workflows/yaml-lint.yml +++ b/.github/workflows/yaml-lint.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code from GitHub - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.1.7 - name: Run yamllint uses: frenck/action-yamllint@v1.5.0 with: From c4c46c206fd5d8edfab0a2769821db0beaae5908 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 13 Jun 2024 10:12:36 +1200 Subject: [PATCH 03/11] Bump esphome-dashboard to 20240613.0 (#6901) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 05e46ca31e..a7b08f8a14 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pyserial==3.5 platformio==6.1.15 # When updating platformio, also update Dockerfile esptool==4.7.0 click==8.1.7 -esphome-dashboard==20240429.1 +esphome-dashboard==20240613.0 aioesphomeapi==24.3.0 zeroconf==0.132.2 python-magic==0.4.27 From fdefc825bb473fedc4fb2b8001ba6ce3f4fe2c7f Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Wed, 12 Jun 2024 19:58:56 +1200 Subject: [PATCH 04/11] [CI] Fix for sdl (#6892) --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a1887c33c..b49237db26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -454,7 +454,7 @@ jobs: matrix: file: ${{ fromJson(needs.list-components.outputs.components) }} steps: - - name: Install libsodium + - name: Install dependencies run: sudo apt-get install libsodium-dev libsdl2-dev - name: Check out code from GitHub @@ -508,8 +508,8 @@ jobs: - name: List components run: echo ${{ matrix.components }} - - name: Install libsodium - run: sudo apt-get install libsodium-dev + - name: Install dependencies + run: sudo apt-get install libsodium-dev libsdl2-dev - name: Check out code from GitHub uses: actions/checkout@v4.1.6 From be486e0ca65bad647289c3a4cfd4d09a09b02e64 Mon Sep 17 00:00:00 2001 From: Oliver Hihn <43825356+oliverhihn@users.noreply.github.com> Date: Wed, 12 Jun 2024 11:09:26 +0200 Subject: [PATCH 05/11] Add step_delay option to X9C component (#6890) --- esphome/components/x9c/output.py | 3 +++ esphome/components/x9c/x9c.cpp | 5 +++-- esphome/components/x9c/x9c.h | 2 ++ esphome/const.py | 1 + tests/components/x9c/test.esp32-c3-idf.yaml | 1 + tests/components/x9c/test.esp32-c3.yaml | 1 + tests/components/x9c/test.esp32-idf.yaml | 1 + tests/components/x9c/test.esp32.yaml | 1 + tests/components/x9c/test.esp8266.yaml | 1 + tests/components/x9c/test.rp2040.yaml | 1 + 10 files changed, 15 insertions(+), 2 deletions(-) diff --git a/esphome/components/x9c/output.py b/esphome/components/x9c/output.py index 44e9d729b3..56820efdfa 100644 --- a/esphome/components/x9c/output.py +++ b/esphome/components/x9c/output.py @@ -8,6 +8,7 @@ from esphome.const import ( CONF_INC_PIN, CONF_UD_PIN, CONF_INITIAL_VALUE, + CONF_STEP_DELAY, ) CODEOWNERS = ["@EtienneMD"] @@ -26,6 +27,7 @@ CONFIG_SCHEMA = cv.All( cv.Optional(CONF_INITIAL_VALUE, default=1.0): cv.float_range( min=0.01, max=1.0 ), + cv.Optional(CONF_STEP_DELAY, default=1): cv.int_range(min=1, max=100), } ) ) @@ -44,3 +46,4 @@ async def to_code(config): cg.add(var.set_ud_pin(ud_pin)) cg.add(var.set_initial_value(config[CONF_INITIAL_VALUE])) + cg.add(var.set_step_delay(config[CONF_STEP_DELAY])) diff --git a/esphome/components/x9c/x9c.cpp b/esphome/components/x9c/x9c.cpp index 32a1375f02..4e7a94266e 100644 --- a/esphome/components/x9c/x9c.cpp +++ b/esphome/components/x9c/x9c.cpp @@ -22,9 +22,9 @@ void X9cOutput::trim_value(int change_amount) { for (int i = 0; i < abs(change_amount); i++) { // Move wiper this->inc_pin_->digital_write(true); - delayMicroseconds(1); + delayMicroseconds(this->step_delay_); this->inc_pin_->digital_write(false); - delayMicroseconds(1); + delayMicroseconds(this->step_delay_); } delayMicroseconds(100); // Let value settle @@ -69,6 +69,7 @@ void X9cOutput::dump_config() { LOG_PIN(" Increment Pin: ", this->inc_pin_); LOG_PIN(" Up/Down Pin: ", this->ud_pin_); ESP_LOGCONFIG(TAG, " Initial Value: %f", this->initial_value_); + ESP_LOGCONFIG(TAG, " Step Delay: %d", this->step_delay_); LOG_FLOAT_OUTPUT(this); } diff --git a/esphome/components/x9c/x9c.h b/esphome/components/x9c/x9c.h index 924460c841..e7cc29a6cc 100644 --- a/esphome/components/x9c/x9c.h +++ b/esphome/components/x9c/x9c.h @@ -13,6 +13,7 @@ class X9cOutput : public output::FloatOutput, public Component { void set_inc_pin(InternalGPIOPin *pin) { inc_pin_ = pin; } void set_ud_pin(InternalGPIOPin *pin) { ud_pin_ = pin; } void set_initial_value(float initial_value) { initial_value_ = initial_value; } + void set_step_delay(int step_delay) { step_delay_ = step_delay; } void setup() override; void dump_config() override; @@ -26,6 +27,7 @@ class X9cOutput : public output::FloatOutput, public Component { InternalGPIOPin *ud_pin_; float initial_value_; float pot_value_; + int step_delay_; }; } // namespace x9c diff --git a/esphome/const.py b/esphome/const.py index 0117e8a238..4d0223fa22 100644 --- a/esphome/const.py +++ b/esphome/const.py @@ -784,6 +784,7 @@ CONF_STATIC_IP = "static_ip" CONF_STATUS = "status" CONF_STB_PIN = "stb_pin" CONF_STEP = "step" +CONF_STEP_DELAY = "step_delay" CONF_STEP_MODE = "step_mode" CONF_STEP_PIN = "step_pin" CONF_STOP = "stop" diff --git a/tests/components/x9c/test.esp32-c3-idf.yaml b/tests/components/x9c/test.esp32-c3-idf.yaml index a0480aa68f..1234581329 100644 --- a/tests/components/x9c/test.esp32-c3-idf.yaml +++ b/tests/components/x9c/test.esp32-c3-idf.yaml @@ -5,3 +5,4 @@ output: inc_pin: 4 ud_pin: 5 initial_value: 0.5 + step_delay: 50 diff --git a/tests/components/x9c/test.esp32-c3.yaml b/tests/components/x9c/test.esp32-c3.yaml index a0480aa68f..1234581329 100644 --- a/tests/components/x9c/test.esp32-c3.yaml +++ b/tests/components/x9c/test.esp32-c3.yaml @@ -5,3 +5,4 @@ output: inc_pin: 4 ud_pin: 5 initial_value: 0.5 + step_delay: 50 diff --git a/tests/components/x9c/test.esp32-idf.yaml b/tests/components/x9c/test.esp32-idf.yaml index 28b18f7a92..5f1468e94b 100644 --- a/tests/components/x9c/test.esp32-idf.yaml +++ b/tests/components/x9c/test.esp32-idf.yaml @@ -5,3 +5,4 @@ output: inc_pin: 14 ud_pin: 15 initial_value: 0.5 + step_delay: 50 diff --git a/tests/components/x9c/test.esp32.yaml b/tests/components/x9c/test.esp32.yaml index 28b18f7a92..5f1468e94b 100644 --- a/tests/components/x9c/test.esp32.yaml +++ b/tests/components/x9c/test.esp32.yaml @@ -5,3 +5,4 @@ output: inc_pin: 14 ud_pin: 15 initial_value: 0.5 + step_delay: 50 diff --git a/tests/components/x9c/test.esp8266.yaml b/tests/components/x9c/test.esp8266.yaml index 28b18f7a92..5f1468e94b 100644 --- a/tests/components/x9c/test.esp8266.yaml +++ b/tests/components/x9c/test.esp8266.yaml @@ -5,3 +5,4 @@ output: inc_pin: 14 ud_pin: 15 initial_value: 0.5 + step_delay: 50 diff --git a/tests/components/x9c/test.rp2040.yaml b/tests/components/x9c/test.rp2040.yaml index a0480aa68f..1234581329 100644 --- a/tests/components/x9c/test.rp2040.yaml +++ b/tests/components/x9c/test.rp2040.yaml @@ -5,3 +5,4 @@ output: inc_pin: 4 ud_pin: 5 initial_value: 0.5 + step_delay: 50 From 91e72fe121acf4d0994bfd084f05e149ce2de92b Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Wed, 12 Jun 2024 21:20:46 +1200 Subject: [PATCH 06/11] [host] Execute host program when using run command (#6897) --- esphome/__main__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/esphome/__main__.py b/esphome/__main__.py index f3c4ff3e23..5ff1a28ec7 100644 --- a/esphome/__main__.py +++ b/esphome/__main__.py @@ -488,6 +488,15 @@ def command_run(args, config): if exit_code != 0: return exit_code _LOGGER.info("Successfully compiled program.") + if CORE.is_host: + from esphome.platformio_api import get_idedata + + idedata = get_idedata(config) + if idedata is None: + return 1 + program_path = idedata.raw["prog_path"] + return run_external_process(program_path) + port = choose_upload_log_host( default=args.device, check_default=None, From 73cb3ec852a3bbdca1430578d4bc3cba114eb115 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 13 Jun 2024 10:12:36 +1200 Subject: [PATCH 07/11] Bump esphome-dashboard to 20240613.0 (#6901) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 05e46ca31e..a7b08f8a14 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pyserial==3.5 platformio==6.1.15 # When updating platformio, also update Dockerfile esptool==4.7.0 click==8.1.7 -esphome-dashboard==20240429.1 +esphome-dashboard==20240613.0 aioesphomeapi==24.3.0 zeroconf==0.132.2 python-magic==0.4.27 From 3db71b98ae4278fa5f54112e7eb885794c258d6b Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 13 Jun 2024 10:31:08 +1200 Subject: [PATCH 08/11] Bump version to 2024.6.0b2 --- esphome/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/const.py b/esphome/const.py index 4d0223fa22..e2dc5c259a 100644 --- a/esphome/const.py +++ b/esphome/const.py @@ -1,6 +1,6 @@ """Constants used by esphome.""" -__version__ = "2024.6.0b1" +__version__ = "2024.6.0b2" ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_" VALID_SUBSTITUTIONS_CHARACTERS = ( From b29e1acab81ddc3bfef041c1cdba0048be2b8c86 Mon Sep 17 00:00:00 2001 From: esphomebot Date: Thu, 13 Jun 2024 19:24:36 +1200 Subject: [PATCH 09/11] Synchronise Device Classes from Home Assistant (#6904) --- esphome/components/update/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esphome/components/update/__init__.py b/esphome/components/update/__init__.py index ae3d5062ab..ea1cf778b6 100644 --- a/esphome/components/update/__init__.py +++ b/esphome/components/update/__init__.py @@ -7,6 +7,7 @@ from esphome.const import ( CONF_ID, CONF_MQTT_ID, CONF_WEB_SERVER_ID, + DEVICE_CLASS_EMPTY, DEVICE_CLASS_FIRMWARE, ) from esphome.core import CORE, coroutine_with_priority @@ -24,6 +25,7 @@ PerformAction = update_ns.class_("PerformAction", automation.Action) IsAvailableCondition = update_ns.class_("IsAvailableCondition", automation.Condition) DEVICE_CLASSES = [ + DEVICE_CLASS_EMPTY, DEVICE_CLASS_FIRMWARE, ] From 761aae6f892edc3d447e4478e4d20c3d124a66a1 Mon Sep 17 00:00:00 2001 From: Keith Burzinski Date: Thu, 13 Jun 2024 05:15:38 -0500 Subject: [PATCH 10/11] [CI] Allow clang-tidy to see IDF components (#6903) * Allow clang-tidy to see IDF components * Remove camera, add tflite-micro --- .github/workflows/ci.yml | 7 +++++++ esphome/idf_component.yml | 9 +++++++++ script/clang-tidy | 6 ++++-- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 esphome/idf_component.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c10e5dac7..df7a9178e1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -387,6 +387,13 @@ jobs: echo "::add-matcher::.github/workflows/matchers/gcc.json" echo "::add-matcher::.github/workflows/matchers/clang-tidy.json" + - name: Run 'pio run --list-targets -e esp32-idf-tidy' + if: matrix.name == 'Run script/clang-tidy for ESP32 IDF' + run: | + . venv/bin/activate + mkdir -p .temp + pio run --list-targets -e esp32-idf-tidy + - name: Run clang-tidy run: | . venv/bin/activate diff --git a/esphome/idf_component.yml b/esphome/idf_component.yml new file mode 100644 index 0000000000..ba1a6312e2 --- /dev/null +++ b/esphome/idf_component.yml @@ -0,0 +1,9 @@ +dependencies: + esp-tflite-micro: + git: https://github.com/espressif/esp-tflite-micro.git + mdns: + git: https://github.com/espressif/esp-protocols.git + version: mdns-v1.2.5 + path: components/mdns + rules: + - if: "idf_version >=5.0" diff --git a/script/clang-tidy b/script/clang-tidy index 84b02306d5..bd919825fd 100755 --- a/script/clang-tidy +++ b/script/clang-tidy @@ -101,8 +101,10 @@ def clang_options(idedata): # add library include directories using -isystem to suppress their errors for directory in sorted(set(idedata["includes"]["build"])): # skip our own directories, we add those later - if not directory.startswith(f"{root_path}/") or directory.startswith( - f"{root_path}/.pio/" + if ( + not directory.startswith(f"{root_path}/") + or directory.startswith(f"{root_path}/.pio/") + or directory.startswith(f"{root_path}/managed_components/") ): cmd.extend(["-isystem", directory]) From 5adadeaa07939f593a761cd2a044db8f8d4385d3 Mon Sep 17 00:00:00 2001 From: Keith Burzinski Date: Thu, 13 Jun 2024 05:42:08 -0500 Subject: [PATCH 11/11] [esp32_camera] Use newer library version (for #6802) (#6809) --- esphome/components/esp32_camera/__init__.py | 9 ++++++--- esphome/idf_component.yml | 3 +++ platformio.ini | 1 - 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/esphome/components/esp32_camera/__init__.py b/esphome/components/esp32_camera/__init__.py index 462900d401..4187429412 100644 --- a/esphome/components/esp32_camera/__init__.py +++ b/esphome/components/esp32_camera/__init__.py @@ -17,7 +17,7 @@ from esphome.const import ( CONF_VSYNC_PIN, ) from esphome.core import CORE -from esphome.components.esp32 import add_idf_sdkconfig_option +from esphome.components.esp32 import add_idf_component from esphome.cpp_helpers import setup_entity DEPENDENCIES = ["esp32"] @@ -290,8 +290,11 @@ async def to_code(config): cg.add_define("USE_ESP32_CAMERA") if CORE.using_esp_idf: - cg.add_library("espressif/esp32-camera", "1.0.0") - add_idf_sdkconfig_option("CONFIG_RTCIO_SUPPORT_RTC_GPIO_DESC", True) + add_idf_component( + name="esp32-camera", + repo="https://github.com/espressif/esp32-camera.git", + ref="v2.0.9", + ) for conf in config.get(CONF_ON_STREAM_START, []): trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var) diff --git a/esphome/idf_component.yml b/esphome/idf_component.yml index ba1a6312e2..c031b2192f 100644 --- a/esphome/idf_component.yml +++ b/esphome/idf_component.yml @@ -1,6 +1,9 @@ dependencies: esp-tflite-micro: git: https://github.com/espressif/esp-tflite-micro.git + esp32_camera: + git: https://github.com/espressif/esp32-camera.git + version: v2.0.9 mdns: git: https://github.com/espressif/esp-protocols.git version: mdns-v1.2.5 diff --git a/platformio.ini b/platformio.ini index 6b34b2f05d..ee82dee243 100644 --- a/platformio.ini +++ b/platformio.ini @@ -142,7 +142,6 @@ platform_packages = framework = espidf lib_deps = ${common:idf.lib_deps} - espressif/esp32-camera@1.0.0 ; esp32_camera droscy/esp_wireguard@0.4.1 ; wireguard build_flags = ${common:idf.build_flags}