From 07b82bb06a17a3acf353453da92746f0f17d361c Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Thu, 20 Jun 2024 00:40:21 +0200 Subject: [PATCH 1/6] Create .gitignore --- .test/.gitignore | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .test/.gitignore diff --git a/.test/.gitignore b/.test/.gitignore new file mode 100644 index 0000000..d433e1a --- /dev/null +++ b/.test/.gitignore @@ -0,0 +1,5 @@ +# Gitignore settings for ESPHome +# This is an example and may include too much for your use-case. +# You can modify this file to suit your needs. +/.esphome/ +# /secrets.yaml From 8851cb4f03e689f099dd5784965f970f24d834a5 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Thu, 20 Jun 2024 09:04:22 +0200 Subject: [PATCH 2/6] Simplify validation --- .github/workflows/validate_esphome.yml | 51 ++++++++++---------------- 1 file changed, 20 insertions(+), 31 deletions(-) diff --git a/.github/workflows/validate_esphome.yml b/.github/workflows/validate_esphome.yml index f3b8fef..fefe01f 100644 --- a/.github/workflows/validate_esphome.yml +++ b/.github/workflows/validate_esphome.yml @@ -71,46 +71,35 @@ jobs: build_basic: name: Basic - needs: [code_scan, setup_dependencies] + needs: + - code_scan runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - id: ard - yaml_file: ".test/esphome_ard_basic.yaml" - cache-hit: ${{ needs.setup_dependencies.outputs.cache-hit-arduino }} - steps: - - name: Checkout repository - uses: actions/checkout@main - - - name: Firmware - if: steps.matrix.outputs.cache-hit != 'true' + - uses: actions/checkout@main + - name: Build core uses: esphome/build-action@v2.0.0 with: - yaml_file: ${{ matrix.yaml_file }} + yaml_file: ".test/esphome_ard_basic.yaml" - build_bluetooth_proxy: - name: Bluetooth Proxy + build_bluetooth_proxy_4: + name: Bluetooth Proxy (IDF v4) needs: build_basic runs-on: ubuntu-latest - strategy: - matrix: - include: - - id: idf_v4 - base: idf_v4 - yaml_file: ".test/esphome_idf_bluetooth_proxy.yaml" - - id: idf_v5 - base: idf_v5 - yaml_file: ".test/esphome_idf5_bluetooth_proxy.yaml" - steps: - - name: Checkout repository - uses: actions/checkout@main + - uses: actions/checkout@main + - name: Build core + uses: esphome/build-action@v2.0.0 + with: + yaml_file: ".test/esphome_idf_bluetooth_proxy.yaml" - - name: Build Bluetooth Proxy Firmware + build_bluetooth_proxy_5: + name: Bluetooth Proxy (IDF v5) + needs: build_basic + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + - name: Build core uses: esphome/build-action@v2.0.0 with: - yaml_file: ${{ matrix.yaml_file }} + yaml_file: ".test/esphome_idf5_bluetooth_proxy.yaml" ... From 84084dbe7aab34d8a4acbeed7c31ec7c484ca5e1 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Thu, 20 Jun 2024 09:05:14 +0200 Subject: [PATCH 3/6] Remove "build" from name --- .github/workflows/validate_esphome.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate_esphome.yml b/.github/workflows/validate_esphome.yml index fefe01f..39688f6 100644 --- a/.github/workflows/validate_esphome.yml +++ b/.github/workflows/validate_esphome.yml @@ -1,5 +1,5 @@ --- -name: Validate and Build ESPHome +name: Validate ESPHome # yamllint disable-line rule:truthy on: From fcc291a018e32c2cb3611d4891b67f53d36e5704 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Thu, 20 Jun 2024 09:36:40 +0200 Subject: [PATCH 4/6] Use build-action from ESPHome main --- .github/workflows/validate_esphome.yml | 6 +++--- .github/workflows/validate_esphome_beta.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/validate_esphome.yml b/.github/workflows/validate_esphome.yml index 39688f6..4f7b025 100644 --- a/.github/workflows/validate_esphome.yml +++ b/.github/workflows/validate_esphome.yml @@ -77,7 +77,7 @@ jobs: steps: - uses: actions/checkout@main - name: Build core - uses: esphome/build-action@v2.0.0 + uses: esphome/build-action@main with: yaml_file: ".test/esphome_ard_basic.yaml" @@ -88,7 +88,7 @@ jobs: steps: - uses: actions/checkout@main - name: Build core - uses: esphome/build-action@v2.0.0 + uses: esphome/build-action@main with: yaml_file: ".test/esphome_idf_bluetooth_proxy.yaml" @@ -99,7 +99,7 @@ jobs: steps: - uses: actions/checkout@main - name: Build core - uses: esphome/build-action@v2.0.0 + uses: esphome/build-action@main with: yaml_file: ".test/esphome_idf5_bluetooth_proxy.yaml" ... diff --git a/.github/workflows/validate_esphome_beta.yml b/.github/workflows/validate_esphome_beta.yml index ff9b88a..621e710 100644 --- a/.github/workflows/validate_esphome_beta.yml +++ b/.github/workflows/validate_esphome_beta.yml @@ -69,7 +69,7 @@ jobs: - name: Firmware if: steps.matrix.outputs.cache-hit != 'true' - uses: barndawgie/build-action@v1.9.0 + uses: esphome/build-action@main with: yaml_file: ${{ matrix.yaml_file }} version: beta @@ -93,7 +93,7 @@ jobs: uses: actions/checkout@main - name: Build Bluetooth Proxy Firmware - uses: barndawgie/build-action@v1.9.0 + uses: esphome/build-action@main with: yaml_file: ${{ matrix.yaml_file }} version: beta From f7d750c059a1c7df91aba7231d374dab540a6369 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Thu, 20 Jun 2024 09:48:47 +0200 Subject: [PATCH 5/6] Clean-up validation --- .github/workflows/validate_esphome.yml | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/.github/workflows/validate_esphome.yml b/.github/workflows/validate_esphome.yml index 4f7b025..8224773 100644 --- a/.github/workflows/validate_esphome.yml +++ b/.github/workflows/validate_esphome.yml @@ -28,32 +28,9 @@ concurrency: cancel-in-progress: true jobs: - setup_dependencies: - name: Setup & Cache Dependencies - runs-on: ubuntu-latest - outputs: - cache-hit-arduino: ${{ steps.cache-arduino.outputs.cache-hit }} - - steps: - - name: Checkout repository - uses: actions/checkout@main - - - name: Cache Arduino Dependencies - id: cache-arduino - uses: actions/cache@main - with: - path: | - ~/.esphome/cache - ~/.platformio/packages - ~/.platformio/platforms - key: ${{ runner.os }}-arduino-${{ hashFiles('**/esphome_ard_basic.yaml') }} - restore-keys: | - ${{ runner.os }}-arduino- - code_scan: name: Code scan (YAML) runs-on: "ubuntu-latest" - needs: setup_dependencies steps: - name: Checkout Code uses: actions/checkout@main From 2091fc4623ac95a61391719fbde288dcd136377e Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Fri, 26 Jul 2024 08:33:30 +0200 Subject: [PATCH 6/6] Do not toggle relay with multi-touch or swipe Solves #14 --- ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml | 30 ++++++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml b/ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml index 46908c0..31595ed 100644 --- a/ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml +++ b/ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml @@ -9,7 +9,7 @@ substitutions: default_transition_length: 500ms invalid_cooldown: 100ms - version: '0.0.2' + version: '0.0.3' api: id: api_server @@ -41,7 +41,12 @@ binary_sensor: on_click: then: - lambda: |- - if (sl_button_1_action->active_index().has_value() and sl_button_1_action->active_index().value() == 1) + if (sl_button_1_action->active_index().has_value() and + sl_button_1_action->active_index().value() == 1 and + !bs_multi_touch->state and + !bs_swipe_left->state and + !bs_swipe_down->state and + !bs_swipe_right->state) sw_relay_1->toggle(); send_event_to_ha->execute("bs_button_1", "click"); on_double_click: @@ -62,7 +67,12 @@ binary_sensor: on_click: then: - lambda: |- - if (sl_button_2_action->active_index().has_value() and sl_button_2_action->active_index().value() == 1) + if (sl_button_2_action->active_index().has_value() and + sl_button_2_action->active_index().value() == 1 and + !bs_multi_touch->state and + !bs_swipe_left->state and + !bs_swipe_down->state and + !bs_swipe_right->state) sw_relay_2->toggle(); send_event_to_ha->execute("bs_button_2", "click"); on_double_click: @@ -82,7 +92,12 @@ binary_sensor: on_click: then: - lambda: |- - if (sl_button_3_action->active_index().has_value() and sl_button_3_action->active_index().value() == 1) + if (sl_button_3_action->active_index().has_value() and + sl_button_3_action->active_index().value() == 1 and + !bs_multi_touch->state and + !bs_swipe_left->state and + !bs_swipe_down->state and + !bs_swipe_right->state) sw_relay_3->toggle(); send_event_to_ha->execute("bs_button_3", "click"); on_double_click: @@ -102,7 +117,12 @@ binary_sensor: on_click: then: - lambda: |- - if (sl_button_4_action->active_index().has_value() and sl_button_4_action->active_index().value() == 1) + if (sl_button_4_action->active_index().has_value() and + sl_button_4_action->active_index().value() == 1 and + !bs_multi_touch->state and + !bs_swipe_left->state and + !bs_swipe_down->state and + !bs_swipe_right->state) sw_relay_4->toggle(); send_event_to_ha->execute("bs_button_4", "click"); on_double_click: