Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ffdb3a22b5 | ||
|
|
b426bdd5dc | ||
|
|
3cdd9f87af | ||
|
|
ddb26cd833 | ||
|
|
5ea4f2015b |
72
.github/workflows/validate_esphome.yml
vendored
72
.github/workflows/validate_esphome.yml
vendored
@@ -55,18 +55,6 @@ jobs:
|
|||||||
yaml-file: ".test/esphome_idf_core.yaml"
|
yaml-file: ".test/esphome_idf_core.yaml"
|
||||||
version: latest
|
version: latest
|
||||||
|
|
||||||
build_idf53_core:
|
|
||||||
name: Core (IDF v5.3)
|
|
||||||
needs: code_scan
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@main
|
|
||||||
- name: Build Core (IDF v5.3)
|
|
||||||
uses: esphome/build-action@main
|
|
||||||
with:
|
|
||||||
yaml-file: ".test/esphome_idf53_core.yaml"
|
|
||||||
version: latest
|
|
||||||
|
|
||||||
build_ard_basic:
|
build_ard_basic:
|
||||||
name: Basic (Arduino)
|
name: Basic (Arduino)
|
||||||
needs: build_ard_core
|
needs: build_ard_core
|
||||||
@@ -91,18 +79,6 @@ jobs:
|
|||||||
yaml-file: ".test/esphome_idf_basic.yaml"
|
yaml-file: ".test/esphome_idf_basic.yaml"
|
||||||
version: latest
|
version: latest
|
||||||
|
|
||||||
build_idf53_basic:
|
|
||||||
name: Basic (IDF v5.3)
|
|
||||||
needs: build_idf53_core
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@main
|
|
||||||
- name: Build Basic (IDF v5.3)
|
|
||||||
uses: esphome/build-action@main
|
|
||||||
with:
|
|
||||||
yaml-file: ".test/esphome_idf53_basic.yaml"
|
|
||||||
version: latest
|
|
||||||
|
|
||||||
build_ard_hw_relays:
|
build_ard_hw_relays:
|
||||||
name: HW Relays (Arduino)
|
name: HW Relays (Arduino)
|
||||||
needs: build_ard_core
|
needs: build_ard_core
|
||||||
@@ -127,18 +103,6 @@ jobs:
|
|||||||
yaml-file: ".test/esphome_idf_hw_relays.yaml"
|
yaml-file: ".test/esphome_idf_hw_relays.yaml"
|
||||||
version: latest
|
version: latest
|
||||||
|
|
||||||
build_idf53_hw_relays:
|
|
||||||
name: HW Relays (IDF v5.3)
|
|
||||||
needs: build_idf53_core
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@main
|
|
||||||
- name: Build HW Relays (IDF v5.3)
|
|
||||||
uses: esphome/build-action@main
|
|
||||||
with:
|
|
||||||
yaml-file: ".test/esphome_idf53_hw_relays.yaml"
|
|
||||||
version: latest
|
|
||||||
|
|
||||||
build_ard_hw_speaker:
|
build_ard_hw_speaker:
|
||||||
name: HW Speaker (Arduino)
|
name: HW Speaker (Arduino)
|
||||||
needs: build_ard_core
|
needs: build_ard_core
|
||||||
@@ -163,18 +127,6 @@ jobs:
|
|||||||
yaml-file: ".test/esphome_idf_hw_speaker.yaml"
|
yaml-file: ".test/esphome_idf_hw_speaker.yaml"
|
||||||
version: latest
|
version: latest
|
||||||
|
|
||||||
build_idf53_hw_speaker:
|
|
||||||
name: HW Speaker (IDF v5.3)
|
|
||||||
needs: build_idf53_core
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@main
|
|
||||||
- name: Build HW Speaker (IDF v5.3)
|
|
||||||
uses: esphome/build-action@main
|
|
||||||
with:
|
|
||||||
yaml-file: ".test/esphome_idf53_hw_speaker.yaml"
|
|
||||||
version: latest
|
|
||||||
|
|
||||||
build_ard_hw_vibration:
|
build_ard_hw_vibration:
|
||||||
name: HW Vibration (Arduino)
|
name: HW Vibration (Arduino)
|
||||||
needs: build_ard_core
|
needs: build_ard_core
|
||||||
@@ -199,18 +151,6 @@ jobs:
|
|||||||
yaml-file: ".test/esphome_idf_hw_vibration.yaml"
|
yaml-file: ".test/esphome_idf_hw_vibration.yaml"
|
||||||
version: latest
|
version: latest
|
||||||
|
|
||||||
build_idf53_hw_vibration:
|
|
||||||
name: HW Vibration (IDF v5.3)
|
|
||||||
needs: build_idf53_core
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@main
|
|
||||||
- name: Build HW Vibration (IDF v5.3)
|
|
||||||
uses: esphome/build-action@main
|
|
||||||
with:
|
|
||||||
yaml-file: ".test/esphome_idf53_hw_vibration.yaml"
|
|
||||||
version: latest
|
|
||||||
|
|
||||||
build_ard_ble_proxy:
|
build_ard_ble_proxy:
|
||||||
name: Bluetooth Proxy (Ard)
|
name: Bluetooth Proxy (Ard)
|
||||||
needs: build_ard_basic
|
needs: build_ard_basic
|
||||||
@@ -235,18 +175,6 @@ jobs:
|
|||||||
yaml-file: ".test/esphome_idf_ble_proxy.yaml"
|
yaml-file: ".test/esphome_idf_ble_proxy.yaml"
|
||||||
version: latest
|
version: latest
|
||||||
|
|
||||||
build_idf53_ble_proxy:
|
|
||||||
name: Bluetooth Proxy (IDF v5.3)
|
|
||||||
needs: build_idf53_basic
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@main
|
|
||||||
- name: Build BLE Proxy (IDF v5.3)
|
|
||||||
uses: esphome/build-action@main
|
|
||||||
with:
|
|
||||||
yaml-file: ".test/esphome_idf53_ble_proxy.yaml"
|
|
||||||
version: latest
|
|
||||||
|
|
||||||
build_ard_media_player:
|
build_ard_media_player:
|
||||||
name: Media Player (Ard)
|
name: Media Player (Ard)
|
||||||
needs:
|
needs:
|
||||||
|
|||||||
72
.github/workflows/validate_esphome_beta.yml
vendored
72
.github/workflows/validate_esphome_beta.yml
vendored
@@ -73,18 +73,6 @@ jobs:
|
|||||||
yaml-file: ".test/esphome_idf_core.yaml"
|
yaml-file: ".test/esphome_idf_core.yaml"
|
||||||
version: beta
|
version: beta
|
||||||
|
|
||||||
build_idf53_core:
|
|
||||||
name: Core (IDF v5.3)
|
|
||||||
needs: code_scan
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@main
|
|
||||||
- name: Build Core (IDF v5.3)
|
|
||||||
uses: esphome/build-action@main
|
|
||||||
with:
|
|
||||||
yaml-file: ".test/esphome_idf53_core.yaml"
|
|
||||||
version: beta
|
|
||||||
|
|
||||||
build_ard_basic:
|
build_ard_basic:
|
||||||
name: Basic (Arduino)
|
name: Basic (Arduino)
|
||||||
needs: build_ard_core
|
needs: build_ard_core
|
||||||
@@ -109,18 +97,6 @@ jobs:
|
|||||||
yaml-file: ".test/esphome_idf_basic.yaml"
|
yaml-file: ".test/esphome_idf_basic.yaml"
|
||||||
version: beta
|
version: beta
|
||||||
|
|
||||||
build_idf53_basic:
|
|
||||||
name: Basic (IDF v5.3)
|
|
||||||
needs: build_idf53_core
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@main
|
|
||||||
- name: Build Basic (IDF v5.3)
|
|
||||||
uses: esphome/build-action@main
|
|
||||||
with:
|
|
||||||
yaml-file: ".test/esphome_idf53_basic.yaml"
|
|
||||||
version: beta
|
|
||||||
|
|
||||||
build_ard_hw_relays:
|
build_ard_hw_relays:
|
||||||
name: HW Relays (Arduino)
|
name: HW Relays (Arduino)
|
||||||
needs: build_ard_core
|
needs: build_ard_core
|
||||||
@@ -145,18 +121,6 @@ jobs:
|
|||||||
yaml-file: ".test/esphome_idf_hw_relays.yaml"
|
yaml-file: ".test/esphome_idf_hw_relays.yaml"
|
||||||
version: beta
|
version: beta
|
||||||
|
|
||||||
build_idf53_hw_relays:
|
|
||||||
name: HW Relays (IDF v5.3)
|
|
||||||
needs: build_idf53_core
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@main
|
|
||||||
- name: Build HW Relays (IDF v5.3)
|
|
||||||
uses: esphome/build-action@main
|
|
||||||
with:
|
|
||||||
yaml-file: ".test/esphome_idf53_hw_relays.yaml"
|
|
||||||
version: beta
|
|
||||||
|
|
||||||
build_ard_hw_speaker:
|
build_ard_hw_speaker:
|
||||||
name: HW Speaker (Arduino)
|
name: HW Speaker (Arduino)
|
||||||
needs: build_ard_core
|
needs: build_ard_core
|
||||||
@@ -181,18 +145,6 @@ jobs:
|
|||||||
yaml-file: ".test/esphome_idf_hw_speaker.yaml"
|
yaml-file: ".test/esphome_idf_hw_speaker.yaml"
|
||||||
version: beta
|
version: beta
|
||||||
|
|
||||||
build_idf53_hw_speaker:
|
|
||||||
name: HW Speaker (IDF v5.3)
|
|
||||||
needs: build_idf53_core
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@main
|
|
||||||
- name: Build HW Speaker (IDF v5.3)
|
|
||||||
uses: esphome/build-action@main
|
|
||||||
with:
|
|
||||||
yaml-file: ".test/esphome_idf53_hw_speaker.yaml"
|
|
||||||
version: beta
|
|
||||||
|
|
||||||
build_ard_hw_vibration:
|
build_ard_hw_vibration:
|
||||||
name: HW Vibration (Arduino)
|
name: HW Vibration (Arduino)
|
||||||
needs: build_ard_core
|
needs: build_ard_core
|
||||||
@@ -217,18 +169,6 @@ jobs:
|
|||||||
yaml-file: ".test/esphome_idf_hw_vibration.yaml"
|
yaml-file: ".test/esphome_idf_hw_vibration.yaml"
|
||||||
version: beta
|
version: beta
|
||||||
|
|
||||||
build_idf53_hw_vibration:
|
|
||||||
name: HW Vibration (IDF v5.3)
|
|
||||||
needs: build_idf53_core
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@main
|
|
||||||
- name: Build HW Vibration (IDF v5.3)
|
|
||||||
uses: esphome/build-action@main
|
|
||||||
with:
|
|
||||||
yaml-file: ".test/esphome_idf53_hw_vibration.yaml"
|
|
||||||
version: beta
|
|
||||||
|
|
||||||
build_ard_ble_proxy:
|
build_ard_ble_proxy:
|
||||||
name: Bluetooth Proxy (Ard)
|
name: Bluetooth Proxy (Ard)
|
||||||
needs: build_ard_basic
|
needs: build_ard_basic
|
||||||
@@ -253,18 +193,6 @@ jobs:
|
|||||||
yaml-file: ".test/esphome_idf_ble_proxy.yaml"
|
yaml-file: ".test/esphome_idf_ble_proxy.yaml"
|
||||||
version: beta
|
version: beta
|
||||||
|
|
||||||
build_idf53_ble_proxy:
|
|
||||||
name: Bluetooth Proxy (IDF v5.3)
|
|
||||||
needs: build_idf53_basic
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@main
|
|
||||||
- name: Build BLE Proxy (IDF v5.3)
|
|
||||||
uses: esphome/build-action@main
|
|
||||||
with:
|
|
||||||
yaml-file: ".test/esphome_idf53_ble_proxy.yaml"
|
|
||||||
version: beta
|
|
||||||
|
|
||||||
build_ard_media_player:
|
build_ard_media_player:
|
||||||
name: Media Player (Ard)
|
name: Media Player (Ard)
|
||||||
needs:
|
needs:
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
packages:
|
|
||||||
common_idf53: !include common_idf53.yaml
|
|
||||||
core_package: !include ../ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml
|
|
||||||
standard_package: !include ../ESPHome/TX-Ultimate-Easy-ESPHome_standard.yaml
|
|
||||||
|
|
||||||
media_player: !remove
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- id: !remove sw_speaker_amplifier
|
|
||||||
...
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
packages:
|
|
||||||
common: !include common.yaml
|
|
||||||
core_package: !include ../ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml
|
|
||||||
standard_package: !include ../ESPHome/TX-Ultimate-Easy-ESPHome_standard.yaml
|
|
||||||
addon_bluetooth_proxy: !include ../ESPHome/TX-Ultimate-Easy-ESPHome_addon_ble_proxy.yaml
|
|
||||||
|
|
||||||
esp32:
|
|
||||||
framework:
|
|
||||||
type: esp-idf
|
|
||||||
version: 5.3.1
|
|
||||||
platform_version: 6.9.0
|
|
||||||
...
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
packages:
|
|
||||||
common_idf53: !include common_idf53.yaml
|
|
||||||
core_package: !include ../ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml
|
|
||||||
...
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
packages:
|
|
||||||
common_idf53: !include common_idf53.yaml
|
|
||||||
core_package: !include ../ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml
|
|
||||||
standard_hw_relays_package: !include ../ESPHome/TX-Ultimate-Easy-ESPHome_standard_hw_relays.yaml
|
|
||||||
...
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
packages:
|
|
||||||
common_idf53: !include common_idf53.yaml
|
|
||||||
core_package: !include ../ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml
|
|
||||||
standard_hw_speaker_package: !include ../ESPHome/TX-Ultimate-Easy-ESPHome_standard_hw_speaker.yaml
|
|
||||||
...
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
packages:
|
|
||||||
common_idf53: !include common_idf53.yaml
|
|
||||||
core_package: !include ../ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml
|
|
||||||
standard_hw_vibration_package: !include ../ESPHome/TX-Ultimate-Easy-ESPHome_standard_hw_vibration.yaml
|
|
||||||
...
|
|
||||||
@@ -17,6 +17,8 @@ substitutions:
|
|||||||
|
|
||||||
<<: !include ../versioning/VERSION_YAML
|
<<: !include ../versioning/VERSION_YAML
|
||||||
|
|
||||||
|
EVENT_NAME: esphome.tx_ultimate_easy
|
||||||
|
|
||||||
TX_MODEL_FORMAT_EU_TEXT: "EU (Square, T5-xC-86)"
|
TX_MODEL_FORMAT_EU_TEXT: "EU (Square, T5-xC-86)"
|
||||||
TX_MODEL_FORMAT_US_TEXT: "US (Rectangle, T5-xC-120)"
|
TX_MODEL_FORMAT_US_TEXT: "US (Rectangle, T5-xC-120)"
|
||||||
|
|
||||||
@@ -116,13 +118,15 @@ script:
|
|||||||
parameters:
|
parameters:
|
||||||
type: string
|
type: string
|
||||||
then:
|
then:
|
||||||
- homeassistant.event:
|
- lambda: |-
|
||||||
event: esphome.tx_ultimate_easy
|
// Send event to Home Assistant
|
||||||
data:
|
esphome::api::CustomAPIDevice ha_event;
|
||||||
device_name: !lambda return tx_device_name->state.c_str();
|
ha_event.fire_homeassistant_event("${EVENT_NAME}", {
|
||||||
firmware: ${version}
|
{"device_name", id(tx_device_name).state.c_str()},
|
||||||
domain: boot
|
{"firmware", "${version}"},
|
||||||
type: !lambda return type.c_str();
|
{"domain", "boot"},
|
||||||
|
{"type", type.c_str()}
|
||||||
|
});
|
||||||
|
|
||||||
- id: boot_done
|
- id: boot_done
|
||||||
mode: restart
|
mode: restart
|
||||||
|
|||||||
@@ -112,18 +112,19 @@ script:
|
|||||||
action: string
|
action: string
|
||||||
count: uint8_t
|
count: uint8_t
|
||||||
then:
|
then:
|
||||||
- homeassistant.event:
|
|
||||||
event: esphome.tx_ultimate_easy
|
|
||||||
data:
|
|
||||||
device_name: !lambda return tx_device_name->state.c_str();
|
|
||||||
firmware: ${version}
|
|
||||||
domain: touch
|
|
||||||
type: button
|
|
||||||
action: !lambda return action.c_str();
|
|
||||||
button_id: !lambda return button;
|
|
||||||
count: !lambda return count;
|
|
||||||
position: !lambda return id(button_press_position);
|
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
|
// Send event to Home Assistant
|
||||||
|
esphome::api::CustomAPIDevice ha_event;
|
||||||
|
ha_event.fire_homeassistant_event("${EVENT_NAME}", {
|
||||||
|
{"device_name", id(tx_device_name).state.c_str()},
|
||||||
|
{"firmware", "${version}"},
|
||||||
|
{"domain", "touch"},
|
||||||
|
{"type", "button"},
|
||||||
|
{"action", action.c_str()},
|
||||||
|
{"button_id", std::to_string(button)},
|
||||||
|
{"count", std::to_string(count)},
|
||||||
|
{"position", std::to_string(id(button_press_position))}
|
||||||
|
});
|
||||||
ESP_LOGI("core_hw_buttons", "Button %" PRIu8 " action: '%s'", button, action.c_str());
|
ESP_LOGI("core_hw_buttons", "Button %" PRIu8 " action: '%s'", button, action.c_str());
|
||||||
if (action == "click") {
|
if (action == "click") {
|
||||||
switch (button) {
|
switch (button) {
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ light:
|
|||||||
# Those lights are available based on the model selections
|
# Those lights are available based on the model selections
|
||||||
- &light_partition_with_effects
|
- &light_partition_with_effects
|
||||||
id: light_eu
|
id: light_eu
|
||||||
name: Light
|
name: Light EU
|
||||||
platform: partition
|
platform: partition
|
||||||
default_transition_length: ${default_transition_length}
|
default_transition_length: ${default_transition_length}
|
||||||
internal: true
|
internal: true
|
||||||
@@ -106,7 +106,7 @@ light:
|
|||||||
to: 27
|
to: 27
|
||||||
|
|
||||||
- id: light_us
|
- id: light_us
|
||||||
name: Light
|
name: Light US
|
||||||
<<: *light_partition_with_effects
|
<<: *light_partition_with_effects
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
@@ -115,7 +115,7 @@ light:
|
|||||||
|
|
||||||
- &light_partition_with_effects_disabled
|
- &light_partition_with_effects_disabled
|
||||||
id: light_eu_bottom
|
id: light_eu_bottom
|
||||||
name: Light - Bottom
|
name: Light - Bottom EU
|
||||||
disabled_by_default: true
|
disabled_by_default: true
|
||||||
<<: *light_partition_with_effects
|
<<: *light_partition_with_effects
|
||||||
segments:
|
segments:
|
||||||
@@ -124,7 +124,7 @@ light:
|
|||||||
to: 12
|
to: 12
|
||||||
reversed: true
|
reversed: true
|
||||||
- id: light_eu_left
|
- id: light_eu_left
|
||||||
name: Light - Left
|
name: Light - Left EU
|
||||||
<<: *light_partition_with_effects_disabled
|
<<: *light_partition_with_effects_disabled
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
@@ -132,7 +132,7 @@ light:
|
|||||||
to: 19
|
to: 19
|
||||||
reversed: true
|
reversed: true
|
||||||
- id: light_eu_right
|
- id: light_eu_right
|
||||||
name: Light - Right
|
name: Light - Right EU
|
||||||
<<: *light_partition_with_effects_disabled
|
<<: *light_partition_with_effects_disabled
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
@@ -144,7 +144,7 @@ light:
|
|||||||
to: 5
|
to: 5
|
||||||
reversed: false
|
reversed: false
|
||||||
- id: light_eu_top
|
- id: light_eu_top
|
||||||
name: Light - Top
|
name: Light - Top EU
|
||||||
<<: *light_partition_with_effects_disabled
|
<<: *light_partition_with_effects_disabled
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
@@ -152,7 +152,7 @@ light:
|
|||||||
to: 26
|
to: 26
|
||||||
reversed: false
|
reversed: false
|
||||||
- id: light_us_bottom
|
- id: light_us_bottom
|
||||||
name: Light - Bottom
|
name: Light - Bottom US
|
||||||
<<: *light_partition_with_effects_disabled
|
<<: *light_partition_with_effects_disabled
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
@@ -160,7 +160,7 @@ light:
|
|||||||
to: 14
|
to: 14
|
||||||
reversed: true
|
reversed: true
|
||||||
- id: light_us_left
|
- id: light_us_left
|
||||||
name: Light - Left
|
name: Light - Left US
|
||||||
<<: *light_partition_with_effects_disabled
|
<<: *light_partition_with_effects_disabled
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
@@ -168,7 +168,7 @@ light:
|
|||||||
to: 24
|
to: 24
|
||||||
reversed: true
|
reversed: true
|
||||||
- id: light_us_right
|
- id: light_us_right
|
||||||
name: Light - Right
|
name: Light - Right US
|
||||||
<<: *light_partition_with_effects_disabled
|
<<: *light_partition_with_effects_disabled
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
@@ -180,7 +180,7 @@ light:
|
|||||||
to: 8
|
to: 8
|
||||||
reversed: false
|
reversed: false
|
||||||
- id: light_us_top
|
- id: light_us_top
|
||||||
name: Light - Top
|
name: Light - Top US
|
||||||
<<: *light_partition_with_effects_disabled
|
<<: *light_partition_with_effects_disabled
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
@@ -567,7 +567,7 @@ select:
|
|||||||
# EU relay light mode template
|
# EU relay light mode template
|
||||||
- &relay_light_mode_eu
|
- &relay_light_mode_eu
|
||||||
id: sl_relay_1_light_mode_eu
|
id: sl_relay_1_light_mode_eu
|
||||||
name: Relay 1 light mode
|
name: Relay 1 light mode EU
|
||||||
platform: template
|
platform: template
|
||||||
options:
|
options:
|
||||||
- "${LIGHT_MODE_DISABLED_TEXT}"
|
- "${LIGHT_MODE_DISABLED_TEXT}"
|
||||||
@@ -582,19 +582,19 @@ select:
|
|||||||
disabled_by_default: false
|
disabled_by_default: false
|
||||||
icon: mdi:dots-square
|
icon: mdi:dots-square
|
||||||
- id: sl_relay_2_light_mode_eu
|
- id: sl_relay_2_light_mode_eu
|
||||||
name: Relay 2 light mode
|
name: Relay 2 light mode EU
|
||||||
<<: *relay_light_mode_eu
|
<<: *relay_light_mode_eu
|
||||||
- id: sl_relay_3_light_mode_eu
|
- id: sl_relay_3_light_mode_eu
|
||||||
name: Relay 3 light mode
|
name: Relay 3 light mode EU
|
||||||
<<: *relay_light_mode_eu
|
<<: *relay_light_mode_eu
|
||||||
- id: sl_relay_4_light_mode_eu
|
- id: sl_relay_4_light_mode_eu
|
||||||
name: Relay 4 light mode
|
name: Relay 4 light mode EU
|
||||||
<<: *relay_light_mode_eu
|
<<: *relay_light_mode_eu
|
||||||
|
|
||||||
# US relay light mode template
|
# US relay light mode template
|
||||||
- &relay_light_mode_us
|
- &relay_light_mode_us
|
||||||
id: sl_relay_1_light_mode_us
|
id: sl_relay_1_light_mode_us
|
||||||
name: Relay 1 light mode
|
name: Relay 1 light mode US
|
||||||
platform: template
|
platform: template
|
||||||
options:
|
options:
|
||||||
- "${LIGHT_MODE_DISABLED_TEXT}"
|
- "${LIGHT_MODE_DISABLED_TEXT}"
|
||||||
@@ -609,12 +609,12 @@ select:
|
|||||||
disabled_by_default: false
|
disabled_by_default: false
|
||||||
icon: mdi:dots-square
|
icon: mdi:dots-square
|
||||||
- id: sl_relay_2_light_mode_us
|
- id: sl_relay_2_light_mode_us
|
||||||
name: Relay 2 light mode
|
name: Relay 2 light mode US
|
||||||
<<: *relay_light_mode_us
|
<<: *relay_light_mode_us
|
||||||
- id: sl_relay_3_light_mode_us
|
- id: sl_relay_3_light_mode_us
|
||||||
name: Relay 3 light mode
|
name: Relay 3 light mode US
|
||||||
<<: *relay_light_mode_us
|
<<: *relay_light_mode_us
|
||||||
- id: sl_relay_4_light_mode_us
|
- id: sl_relay_4_light_mode_us
|
||||||
name: Relay 4 light mode
|
name: Relay 4 light mode US
|
||||||
<<: *relay_light_mode_us
|
<<: *relay_light_mode_us
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -386,19 +386,23 @@ tx_ultimate_easy:
|
|||||||
}
|
}
|
||||||
|
|
||||||
on_multi_touch_release:
|
on_multi_touch_release:
|
||||||
- homeassistant.event:
|
then:
|
||||||
event: esphome.tx_ultimate_easy
|
- lambda: |-
|
||||||
data:
|
// Send event to Home Assistant
|
||||||
device_name: !lambda return tx_device_name->state.c_str();
|
esphome::api::CustomAPIDevice ha_event;
|
||||||
firmware: ${version}
|
ha_event.fire_homeassistant_event("${EVENT_NAME}", {
|
||||||
domain: touch
|
{"device_name", id(tx_device_name).state.c_str()},
|
||||||
type: multi_touch
|
{"firmware", "${version}"},
|
||||||
action: release
|
{"domain", "touch"},
|
||||||
position: !lambda return touch.x;
|
{"type", "multi_touch"},
|
||||||
- lambda: ESP_LOGI("core_hw_touch", "Multi-touch released");
|
{"action", "release"},
|
||||||
- script.execute: touch_on_multi_touch_release
|
{"position", std::to_string(touch.x)}
|
||||||
|
});
|
||||||
|
ESP_LOGI("core_hw_touch", "Multi-touch released");
|
||||||
|
touch_on_multi_touch_release->execute();
|
||||||
|
|
||||||
on_press:
|
on_press:
|
||||||
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
const uint8_t position = static_cast<uint8_t>(touch.x);
|
const uint8_t position = static_cast<uint8_t>(touch.x);
|
||||||
if (position > ${TOUCH_POSITION_MAX_VALUE}) { // Check for valid range
|
if (position > ${TOUCH_POSITION_MAX_VALUE}) { // Check for valid range
|
||||||
@@ -409,46 +413,47 @@ tx_ultimate_easy:
|
|||||||
}
|
}
|
||||||
|
|
||||||
on_release:
|
on_release:
|
||||||
|
then:
|
||||||
- lambda: ESP_LOGI("core_hw_touch", "Released");
|
- lambda: ESP_LOGI("core_hw_touch", "Released");
|
||||||
- script.execute: touch_on_release
|
- script.execute: touch_on_release
|
||||||
|
|
||||||
on_swipe_left:
|
on_swipe_left:
|
||||||
- homeassistant.event:
|
then:
|
||||||
event: esphome.tx_ultimate_easy
|
|
||||||
data:
|
|
||||||
device_name: !lambda return tx_device_name->state.c_str();
|
|
||||||
firmware: ${version}
|
|
||||||
domain: touch
|
|
||||||
type: swipe
|
|
||||||
action: !lambda |-
|
|
||||||
return sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}" ? "left" : "down";
|
|
||||||
swipe-direction: !lambda |-
|
|
||||||
return sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}" ? "left" : "down";
|
|
||||||
position: !lambda return touch.x;
|
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
ESP_LOGI("core_hw_touch", "Swipe %s", sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}"
|
std::string swipe_direction = (sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}") ? "left" : "down";
|
||||||
? "left"
|
// Send event to Home Assistant
|
||||||
: "down");
|
esphome::api::CustomAPIDevice ha_event;
|
||||||
- script.execute: touch_swipe_left
|
ha_event.fire_homeassistant_event("${EVENT_NAME}", {
|
||||||
|
{"device_name", id(tx_device_name).state.c_str()},
|
||||||
|
{"firmware", "${version}"},
|
||||||
|
{"domain", "touch"},
|
||||||
|
{"type", "swipe"},
|
||||||
|
{"action", swipe_direction.c_str()},
|
||||||
|
{"swipe-direction", swipe_direction.c_str()},
|
||||||
|
{"position", std::to_string(touch.x)}
|
||||||
|
});
|
||||||
|
ESP_LOGI("core_hw_touch", "Multi-touch released");
|
||||||
|
touch_on_multi_touch_release->execute();
|
||||||
|
ESP_LOGI("core_hw_touch", "Swipe %s", swipe_direction.c_str());
|
||||||
|
touch_swipe_left->execute();
|
||||||
|
|
||||||
on_swipe_right:
|
on_swipe_right:
|
||||||
- homeassistant.event:
|
then:
|
||||||
event: esphome.tx_ultimate_easy
|
|
||||||
data:
|
|
||||||
device_name: !lambda return tx_device_name->state.c_str();
|
|
||||||
firmware: ${version}
|
|
||||||
domain: touch
|
|
||||||
type: swipe
|
|
||||||
action: !lambda |-
|
|
||||||
return sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}" ? "right" : "up";
|
|
||||||
swipe-direction: !lambda |-
|
|
||||||
return sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}" ? "right" : "up";
|
|
||||||
position: !lambda return touch.x;
|
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
ESP_LOGI("core_hw_touch", "Swipe %s", sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}"
|
std::string swipe_direction = (sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}") ? "right" : "up";
|
||||||
? "right"
|
// Send event to Home Assistant
|
||||||
: "up");
|
esphome::api::CustomAPIDevice ha_event;
|
||||||
- script.execute: touch_swipe_right
|
ha_event.fire_homeassistant_event("${EVENT_NAME}", {
|
||||||
|
{"device_name", id(tx_device_name).state.c_str()},
|
||||||
|
{"firmware", "${version}"},
|
||||||
|
{"domain", "touch"},
|
||||||
|
{"type", "swipe"},
|
||||||
|
{"action", swipe_direction.c_str()},
|
||||||
|
{"swipe-direction", swipe_direction.c_str()},
|
||||||
|
{"position", std::to_string(touch.x)}
|
||||||
|
});
|
||||||
|
ESP_LOGI("core_hw_touch", "Swipe %s", swipe_direction.c_str());
|
||||||
|
touch_swipe_right->execute();
|
||||||
|
|
||||||
on_touch_event:
|
on_touch_event:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2025.5.1
|
2025.7.1
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
version: 2025.5.1
|
version: 2025.7.1
|
||||||
|
|||||||
Reference in New Issue
Block a user