Compare commits
28 Commits
v2024.12.9
...
v2024.12.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8470f56e4 | ||
|
|
2429c9d616 | ||
|
|
7a5a537847 | ||
|
|
2aa036dc0e | ||
|
|
802acdc476 | ||
|
|
37b2e93896 | ||
|
|
695cca07a0 | ||
|
|
f258b8f783 | ||
|
|
7e055e7737 | ||
|
|
9fec812b66 | ||
|
|
269ba89bd3 | ||
|
|
ae87f025a3 | ||
|
|
303a3f1267 | ||
|
|
a716e8e9cf | ||
|
|
d77d761497 | ||
|
|
ec528ec128 | ||
|
|
4ed98e533f | ||
|
|
1ef73d5cd0 | ||
|
|
420225b6ba | ||
|
|
8996cfbdf8 | ||
|
|
085250c471 | ||
|
|
6230e31323 | ||
|
|
248f7e9cd8 | ||
|
|
6343e6eb4a | ||
|
|
226d5db7c8 | ||
|
|
dbde1da920 | ||
|
|
f2ff037c82 | ||
|
|
82af8b6687 |
8
.github/workflows/validate_esphome.yml
vendored
8
.github/workflows/validate_esphome.yml
vendored
@@ -1,8 +1,7 @@
|
|||||||
---
|
---
|
||||||
name: Validate ESPHome
|
name: Validate ESPHome (Latest)
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
on: # yamllint disable-line rule:truthy
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
@@ -37,6 +36,7 @@ jobs:
|
|||||||
uses: esphome/build-action@main
|
uses: esphome/build-action@main
|
||||||
with:
|
with:
|
||||||
yaml-file: ".test/esphome_ard_basic.yaml"
|
yaml-file: ".test/esphome_ard_basic.yaml"
|
||||||
|
version: latest
|
||||||
|
|
||||||
build_bluetooth_proxy_4:
|
build_bluetooth_proxy_4:
|
||||||
name: Bluetooth Proxy (IDF)
|
name: Bluetooth Proxy (IDF)
|
||||||
@@ -47,6 +47,7 @@ jobs:
|
|||||||
uses: esphome/build-action@main
|
uses: esphome/build-action@main
|
||||||
with:
|
with:
|
||||||
yaml-file: ".test/esphome_idf_bluetooth_proxy.yaml"
|
yaml-file: ".test/esphome_idf_bluetooth_proxy.yaml"
|
||||||
|
version: latest
|
||||||
|
|
||||||
build_bluetooth_proxy_53:
|
build_bluetooth_proxy_53:
|
||||||
name: Bluetooth Proxy (IDF v5.3)
|
name: Bluetooth Proxy (IDF v5.3)
|
||||||
@@ -57,4 +58,5 @@ jobs:
|
|||||||
uses: esphome/build-action@main
|
uses: esphome/build-action@main
|
||||||
with:
|
with:
|
||||||
yaml-file: ".test/esphome_idf53_bluetooth_proxy.yaml"
|
yaml-file: ".test/esphome_idf53_bluetooth_proxy.yaml"
|
||||||
|
version: latest
|
||||||
...
|
...
|
||||||
|
|||||||
2
.github/workflows/validate_esphome_beta.yml
vendored
2
.github/workflows/validate_esphome_beta.yml
vendored
@@ -11,6 +11,8 @@ on: # yamllint disable-line rule:truthy
|
|||||||
- "*.c"
|
- "*.c"
|
||||||
- "*.cpp"
|
- "*.cpp"
|
||||||
- "*.py"
|
- "*.py"
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- "*.yaml"
|
- "*.yaml"
|
||||||
|
|||||||
@@ -11,6 +11,27 @@
|
|||||||
##### - For normal system use, modifications to this file are NOT required. #####
|
##### - For normal system use, modifications to this file are NOT required. #####
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
---
|
---
|
||||||
|
substitutions:
|
||||||
|
# RTTTL format: name:d=duration,o=octave,b=tempo:notes
|
||||||
|
# d=32 (32nd note), o=5 (octave 5), b=100 (tempo 100)
|
||||||
|
tone_volume_change: "scale_up:d=32,o=5,b=100:c,c#,d#,e,f#,g#,a#,b" # Use "none" to disable sound
|
||||||
|
|
||||||
|
api:
|
||||||
|
actions:
|
||||||
|
- action: rtttl_play
|
||||||
|
variables:
|
||||||
|
# The RTTTL string for the melody to be played.
|
||||||
|
# It should follow the RTTTL format, including the melody's name,
|
||||||
|
# default settings, and a sequence of notes.
|
||||||
|
tone: string
|
||||||
|
then:
|
||||||
|
- lambda: |-
|
||||||
|
rtttl_speaker->stop();
|
||||||
|
if (rtttl_speaker_gain->state > 0) {
|
||||||
|
ESP_LOGI("api", "Play tone: '%s'", tone.c_str());
|
||||||
|
rtttl_speaker->play(tone.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
bluetooth_proxy:
|
bluetooth_proxy:
|
||||||
|
|
||||||
esp32:
|
esp32:
|
||||||
@@ -33,17 +54,54 @@ esphome:
|
|||||||
build_flags:
|
build_flags:
|
||||||
- -D TX_ULTIMATE_EASY_ADDON_BLE_PROXY
|
- -D TX_ULTIMATE_EASY_ADDON_BLE_PROXY
|
||||||
|
|
||||||
i2s_audio: !remove
|
|
||||||
|
|
||||||
light:
|
light:
|
||||||
- id: !extend light_full
|
- id: !extend light_full
|
||||||
platform: esp32_rmt_led_strip
|
platform: esp32_rmt_led_strip
|
||||||
rgb_order: GRB
|
rgb_order: GRB
|
||||||
rmt_channel: 0
|
rmt_channel: 1
|
||||||
chipset: ws2812
|
chipset: ws2812
|
||||||
type: !remove
|
type: !remove
|
||||||
variant: !remove
|
variant: !remove
|
||||||
max_refresh_rate: 33ms
|
max_refresh_rate: 33ms
|
||||||
|
use_psram: true
|
||||||
|
|
||||||
media_player: !remove
|
media_player: !remove
|
||||||
|
|
||||||
|
number:
|
||||||
|
- id: rtttl_speaker_gain
|
||||||
|
name: Sound - Volume
|
||||||
|
platform: template
|
||||||
|
max_value: 100
|
||||||
|
min_value: 0
|
||||||
|
step: 1
|
||||||
|
initial_value: 100
|
||||||
|
unit_of_measurement: "%"
|
||||||
|
internal: false
|
||||||
|
disabled_by_default: true
|
||||||
|
entity_category: config
|
||||||
|
device_class: sound_pressure
|
||||||
|
restore_value: true
|
||||||
|
optimistic: true
|
||||||
|
set_action:
|
||||||
|
then:
|
||||||
|
- lambda: |-
|
||||||
|
rtttl_speaker->set_gain((100-(x/10.0f))/100.0f);
|
||||||
|
std::string tone_volume_change = "${tone_volume_change}";
|
||||||
|
// Play sound if tone_volume_change is not "none"
|
||||||
|
if (x > 0 and !tone_volume_change.empty() and tone_volume_change != "none")
|
||||||
|
rtttl_speaker->play(tone_volume_change);
|
||||||
|
rtttl_speaker->dump_config();
|
||||||
|
|
||||||
|
rtttl:
|
||||||
|
- id: rtttl_speaker
|
||||||
|
speaker: mp_speaker
|
||||||
|
|
||||||
|
speaker:
|
||||||
|
- id: mp_speaker
|
||||||
|
platform: i2s_audio
|
||||||
|
dac_type: external
|
||||||
|
i2s_dout_pin: GPIO15
|
||||||
|
i2s_audio_id: if_i2s_audio
|
||||||
|
i2s_comm_fmt: stand_msb
|
||||||
|
channel: mono
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -75,6 +75,17 @@ esphome:
|
|||||||
then:
|
then:
|
||||||
- script.execute: boot_done
|
- script.execute: boot_done
|
||||||
|
|
||||||
|
globals:
|
||||||
|
- id: is_us_model
|
||||||
|
type: bool
|
||||||
|
restore_value: true
|
||||||
|
initial_value: 'false'
|
||||||
|
|
||||||
|
- id: gang_count
|
||||||
|
type: uint8_t
|
||||||
|
restore_value: true
|
||||||
|
initial_value: '0'
|
||||||
|
|
||||||
improv_serial:
|
improv_serial:
|
||||||
id: serial_improv
|
id: serial_improv
|
||||||
|
|
||||||
@@ -85,6 +96,8 @@ ota:
|
|||||||
platform: esphome
|
platform: esphome
|
||||||
|
|
||||||
psram:
|
psram:
|
||||||
|
mode: octal
|
||||||
|
speed: 40MHz
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- id: api_send_ha_event_boot
|
- id: api_send_ha_event_boot
|
||||||
@@ -144,6 +157,11 @@ select:
|
|||||||
entity_category: config
|
entity_category: config
|
||||||
disabled_by_default: false
|
disabled_by_default: false
|
||||||
icon: mdi:tablet-cellphone
|
icon: mdi:tablet-cellphone
|
||||||
|
on_value:
|
||||||
|
then:
|
||||||
|
- lambda: |-
|
||||||
|
id(is_us_model) = (x == "${TX_MODEL_FORMAT_US_TEXT}");
|
||||||
|
ESP_LOGI("core", "New model selected: %s", id(is_us_model) ? "US" : "EU");
|
||||||
|
|
||||||
- id: sl_tx_model_gang
|
- id: sl_tx_model_gang
|
||||||
name: Model (Gang)
|
name: Model (Gang)
|
||||||
@@ -162,11 +180,20 @@ select:
|
|||||||
icon: mdi:dip-switch
|
icon: mdi:dip-switch
|
||||||
on_value:
|
on_value:
|
||||||
then:
|
then:
|
||||||
- lambda: tx_ultimate->set_gang_count(static_cast<uint8_t>(i)+1);
|
- lambda: |-
|
||||||
|
id(gang_count) = static_cast<uint8_t>(i) + 1;
|
||||||
|
ESP_LOGI("core", "New model selected: %" PRIu8 "-%s", id(gang_count), id(gang_count) > 1 ? "Gangs" : "Gang");
|
||||||
|
tx_ultimate->set_gang_count(id(gang_count));
|
||||||
|
|
||||||
text_sensor:
|
text_sensor:
|
||||||
|
- id: esphome_fw_version
|
||||||
|
name: ESPHome Version
|
||||||
|
platform: version
|
||||||
|
entity_category: diagnostic
|
||||||
|
internal: false
|
||||||
|
|
||||||
- id: tx_fw_version
|
- id: tx_fw_version
|
||||||
name: Firmware version
|
name: TX Ultimate Easy Firmware Version
|
||||||
platform: template
|
platform: template
|
||||||
entity_category: diagnostic
|
entity_category: diagnostic
|
||||||
icon: mdi:tag-text-outline
|
icon: mdi:tag-text-outline
|
||||||
|
|||||||
@@ -25,6 +25,11 @@ substitutions:
|
|||||||
LIGHT_TRANSITION_TURN_OFF: '0' # Transition time in msec
|
LIGHT_TRANSITION_TURN_OFF: '0' # Transition time in msec
|
||||||
LIGHT_BRIGHTNESS_TURN_ON: '0' # Brightness (1 to 100%, 0 to not set it)
|
LIGHT_BRIGHTNESS_TURN_ON: '0' # Brightness (1 to 100%, 0 to not set it)
|
||||||
|
|
||||||
|
LIGHT_FULL_RESTORE_MODE: RESTORE_DEFAULT_OFF
|
||||||
|
LIGHT_SIDES_RESTORE_MODE: RESTORE_DEFAULT_OFF
|
||||||
|
LIGHT_INDIVIDUAL_RESTORE_MODE: RESTORE_DEFAULT_OFF
|
||||||
|
LIGHT_RELAYS_RESTORE_MODE: RESTORE_DEFAULT_OFF
|
||||||
|
|
||||||
globals:
|
globals:
|
||||||
- id: gb_lights_1
|
- id: gb_lights_1
|
||||||
type: std::vector<light::LightState*>
|
type: std::vector<light::LightState*>
|
||||||
@@ -44,6 +49,7 @@ light:
|
|||||||
# method: esp32_rmt
|
# method: esp32_rmt
|
||||||
num_leds: 32
|
num_leds: 32
|
||||||
pin: GPIO13
|
pin: GPIO13
|
||||||
|
restore_mode: ${LIGHT_FULL_RESTORE_MODE}
|
||||||
|
|
||||||
# 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
|
||||||
@@ -52,6 +58,7 @@ light:
|
|||||||
platform: partition
|
platform: partition
|
||||||
default_transition_length: ${default_transition_length}
|
default_transition_length: ${default_transition_length}
|
||||||
internal: true
|
internal: true
|
||||||
|
restore_mode: ${LIGHT_SIDES_RESTORE_MODE}
|
||||||
effects:
|
effects:
|
||||||
- addressable_rainbow:
|
- addressable_rainbow:
|
||||||
name: "Rainbow"
|
name: "Rainbow"
|
||||||
@@ -184,6 +191,7 @@ light:
|
|||||||
platform: partition
|
platform: partition
|
||||||
disabled_by_default: true
|
disabled_by_default: true
|
||||||
default_transition_length: ${default_transition_length}
|
default_transition_length: ${default_transition_length}
|
||||||
|
restore_mode: ${LIGHT_INDIVIDUAL_RESTORE_MODE}
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
from: 0
|
from: 0
|
||||||
@@ -417,6 +425,7 @@ light:
|
|||||||
platform: partition
|
platform: partition
|
||||||
internal: true
|
internal: true
|
||||||
default_transition_length: ${default_transition_length}
|
default_transition_length: ${default_transition_length}
|
||||||
|
restore_mode: ${LIGHT_RELAYS_RESTORE_MODE}
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
from: 9
|
from: 9
|
||||||
@@ -635,8 +644,8 @@ light:
|
|||||||
<<: *light_partition_relays
|
<<: *light_partition_relays
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
from: 17
|
from: 16
|
||||||
to: 18
|
to: 17
|
||||||
- id: light_us_rl_3_3_right
|
- id: light_us_rl_3_3_right
|
||||||
name: Light - Relay 3 of 3 (right)
|
name: Light - Relay 3 of 3 (right)
|
||||||
<<: *light_partition_relays
|
<<: *light_partition_relays
|
||||||
@@ -649,8 +658,8 @@ light:
|
|||||||
<<: *light_partition_relays
|
<<: *light_partition_relays
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
from: 12
|
from: 23
|
||||||
to: 12
|
to: 24
|
||||||
- id: light_us_rl_1_4_right
|
- id: light_us_rl_1_4_right
|
||||||
name: Light - Relay 1 of 4 (right)
|
name: Light - Relay 1 of 4 (right)
|
||||||
<<: *light_partition_relays
|
<<: *light_partition_relays
|
||||||
@@ -658,48 +667,51 @@ light:
|
|||||||
- id: light_full
|
- id: light_full
|
||||||
from: 31
|
from: 31
|
||||||
to: 31
|
to: 31
|
||||||
|
- id: light_full
|
||||||
|
from: 0
|
||||||
|
to: 0
|
||||||
- id: light_us_rl_2_4_left
|
- id: light_us_rl_2_4_left
|
||||||
name: Light - Relay 2 of 4 (left)
|
name: Light - Relay 2 of 4 (left)
|
||||||
<<: *light_partition_relays
|
<<: *light_partition_relays
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
from: 24
|
from: 21
|
||||||
to: 24
|
to: 22
|
||||||
- id: light_us_rl_2_4_right
|
- id: light_us_rl_2_4_right
|
||||||
name: Light - Relay 2 of 4 (right)
|
name: Light - Relay 2 of 4 (right)
|
||||||
<<: *light_partition_relays
|
<<: *light_partition_relays
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
from: 2
|
from: 1
|
||||||
to: 2
|
to: 2
|
||||||
- id: light_us_rl_3_4_left
|
- id: light_us_rl_3_4_left
|
||||||
name: Light - Relay 3 of 4 (left)
|
name: Light - Relay 3 of 4 (left)
|
||||||
<<: *light_partition_relays
|
<<: *light_partition_relays
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
from: 21
|
from: 17
|
||||||
to: 21
|
to: 18
|
||||||
- id: light_us_rl_3_4_right
|
- id: light_us_rl_3_4_right
|
||||||
name: Light - Relay 3 of 4 (right)
|
name: Light - Relay 3 of 4 (right)
|
||||||
<<: *light_partition_relays
|
<<: *light_partition_relays
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
from: 4
|
from: 5
|
||||||
to: 4
|
to: 6
|
||||||
- id: light_us_rl_4_4_left
|
- id: light_us_rl_4_4_left
|
||||||
name: Light - Relay 4 of 4 (left)
|
name: Light - Relay 4 of 4 (left)
|
||||||
<<: *light_partition_relays
|
<<: *light_partition_relays
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
from: 19
|
from: 15
|
||||||
to: 19
|
to: 16
|
||||||
- id: light_us_rl_4_4_right
|
- id: light_us_rl_4_4_right
|
||||||
name: Light - Relay 4 of 4 (right)
|
name: Light - Relay 4 of 4 (right)
|
||||||
<<: *light_partition_relays
|
<<: *light_partition_relays
|
||||||
segments:
|
segments:
|
||||||
- id: light_full
|
- id: light_full
|
||||||
from: 7
|
from: 7
|
||||||
to: 7
|
to: 8
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- id: !extend boot_initialize
|
- id: !extend boot_initialize
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ substitutions:
|
|||||||
RELAY_MODE_TEXT_SWITCH: "Switch"
|
RELAY_MODE_TEXT_SWITCH: "Switch"
|
||||||
RELAY_MODE_TEXT_LIGHT: "Light"
|
RELAY_MODE_TEXT_LIGHT: "Light"
|
||||||
RELAY_MODE_TEXT_NOT_USED: "Not in use"
|
RELAY_MODE_TEXT_NOT_USED: "Not in use"
|
||||||
|
RELAY_RESTORE_MODE: RESTORE_DEFAULT_OFF
|
||||||
|
|
||||||
globals:
|
globals:
|
||||||
- id: boot_initialization_relays
|
- id: boot_initialization_relays
|
||||||
@@ -29,6 +30,7 @@ light:
|
|||||||
output: output_relay_1
|
output: output_relay_1
|
||||||
platform: binary
|
platform: binary
|
||||||
internal: true
|
internal: true
|
||||||
|
restore_mode: ${RELAY_RESTORE_MODE}
|
||||||
on_turn_on:
|
on_turn_on:
|
||||||
then:
|
then:
|
||||||
- if:
|
- if:
|
||||||
@@ -189,22 +191,55 @@ script:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Toggle relay if corresponding button action is enabled
|
// Toggle relay if corresponding button action is enabled
|
||||||
|
ESP_LOGVV("core_hw_relays", "Toggle relays: (${BUTTON_ACTION_NONE_TEXT})");
|
||||||
|
ESP_LOGVV("core_hw_relays", " Relay 1: %s (%s)",
|
||||||
|
YESNO(sl_button_1_action->state != "${BUTTON_ACTION_NONE_TEXT}"),
|
||||||
|
sl_button_1_action->state.c_str());
|
||||||
|
ESP_LOGVV("core_hw_relays", " Relay 2: %s (%s)",
|
||||||
|
YESNO(sl_button_2_action->state != "${BUTTON_ACTION_NONE_TEXT}"),
|
||||||
|
sl_button_2_action->state.c_str());
|
||||||
|
ESP_LOGVV("core_hw_relays", " Relay 3: %s (%s)",
|
||||||
|
YESNO(sl_button_3_action->state != "${BUTTON_ACTION_NONE_TEXT}"),
|
||||||
|
sl_button_3_action->state.c_str());
|
||||||
|
ESP_LOGVV("core_hw_relays", " Relay 4: %s (%s)",
|
||||||
|
YESNO(sl_button_4_action->state != "${BUTTON_ACTION_NONE_TEXT}"),
|
||||||
|
sl_button_4_action->state.c_str());
|
||||||
switch (button) {
|
switch (button) {
|
||||||
case ${BUTTON_1_ID}:
|
case ${BUTTON_1_ID}:
|
||||||
if (sl_button_1_action->state != "${RELAY_MODE_TEXT_NOT_USED}")
|
if (sl_button_1_action->state != "${BUTTON_ACTION_NONE_TEXT}") {
|
||||||
|
ESP_LOGV("core_hw_relays", "Toggle relay 1: (%s)", sl_button_1_action->state.c_str());
|
||||||
sw_relay_1->toggle();
|
sw_relay_1->toggle();
|
||||||
|
} else {
|
||||||
|
ESP_LOGV("core_hw_relays", "Ignoring toggle for relay 1: action is '%s'",
|
||||||
|
sl_button_1_action->state.c_str());
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ${BUTTON_2_ID}:
|
case ${BUTTON_2_ID}:
|
||||||
if (sl_button_2_action->state != "${RELAY_MODE_TEXT_NOT_USED}")
|
if (sl_button_2_action->state != "${BUTTON_ACTION_NONE_TEXT}") {
|
||||||
|
ESP_LOGV("core_hw_relays", "Toggle relay 2: (%s)", sl_button_2_action->state.c_str());
|
||||||
sw_relay_2->toggle();
|
sw_relay_2->toggle();
|
||||||
|
} else {
|
||||||
|
ESP_LOGV("core_hw_relays", "Ignoring toggle for relay 2: action is '%s'",
|
||||||
|
sl_button_2_action->state.c_str());
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ${BUTTON_3_ID}:
|
case ${BUTTON_3_ID}:
|
||||||
if (sl_button_3_action->state != "${RELAY_MODE_TEXT_NOT_USED}")
|
if (sl_button_3_action->state != "${BUTTON_ACTION_NONE_TEXT}") {
|
||||||
|
ESP_LOGV("core_hw_relays", "Toggle relay 3: (%s)", sl_button_3_action->state.c_str());
|
||||||
sw_relay_3->toggle();
|
sw_relay_3->toggle();
|
||||||
|
} else {
|
||||||
|
ESP_LOGV("core_hw_relays", "Ignoring toggle for relay 3: action is '%s'",
|
||||||
|
sl_button_3_action->state.c_str());
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ${BUTTON_4_ID}:
|
case ${BUTTON_4_ID}:
|
||||||
if (sl_button_4_action->state != "${RELAY_MODE_TEXT_NOT_USED}")
|
if (sl_button_4_action->state != "${BUTTON_ACTION_NONE_TEXT}") {
|
||||||
|
ESP_LOGV("core_hw_relays", "Toggle relay 4: (%s)", sl_button_4_action->state.c_str());
|
||||||
sw_relay_4->toggle();
|
sw_relay_4->toggle();
|
||||||
|
} else {
|
||||||
|
ESP_LOGV("core_hw_relays", "Ignoring toggle for relay 4: action is '%s'",
|
||||||
|
sl_button_4_action->state.c_str());
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -316,7 +351,7 @@ switch:
|
|||||||
name: Relay 1
|
name: Relay 1
|
||||||
output: output_relay_1
|
output: output_relay_1
|
||||||
platform: output
|
platform: output
|
||||||
restore_mode: RESTORE_DEFAULT_OFF
|
restore_mode: ${RELAY_RESTORE_MODE}
|
||||||
internal: true
|
internal: true
|
||||||
on_turn_on:
|
on_turn_on:
|
||||||
then:
|
then:
|
||||||
@@ -339,7 +374,7 @@ switch:
|
|||||||
name: Relay 2
|
name: Relay 2
|
||||||
output: output_relay_2
|
output: output_relay_2
|
||||||
platform: output
|
platform: output
|
||||||
restore_mode: RESTORE_DEFAULT_OFF
|
restore_mode: ${RELAY_RESTORE_MODE}
|
||||||
internal: true
|
internal: true
|
||||||
on_turn_on:
|
on_turn_on:
|
||||||
then:
|
then:
|
||||||
@@ -362,7 +397,7 @@ switch:
|
|||||||
name: Relay 3
|
name: Relay 3
|
||||||
output: output_relay_3
|
output: output_relay_3
|
||||||
platform: output
|
platform: output
|
||||||
restore_mode: RESTORE_DEFAULT_OFF
|
restore_mode: ${RELAY_RESTORE_MODE}
|
||||||
internal: true
|
internal: true
|
||||||
on_turn_on:
|
on_turn_on:
|
||||||
then:
|
then:
|
||||||
@@ -385,7 +420,7 @@ switch:
|
|||||||
name: Relay 4
|
name: Relay 4
|
||||||
output: output_relay_4
|
output: output_relay_4
|
||||||
platform: output
|
platform: output
|
||||||
restore_mode: RESTORE_DEFAULT_OFF
|
restore_mode: ${RELAY_RESTORE_MODE}
|
||||||
internal: true
|
internal: true
|
||||||
on_turn_on:
|
on_turn_on:
|
||||||
then:
|
then:
|
||||||
|
|||||||
@@ -19,11 +19,11 @@ i2s_audio:
|
|||||||
media_player:
|
media_player:
|
||||||
- id: mp_speaker
|
- id: mp_speaker
|
||||||
name: Speaker
|
name: Speaker
|
||||||
|
internal: false
|
||||||
platform: i2s_audio
|
platform: i2s_audio
|
||||||
i2s_dout_pin: GPIO15
|
i2s_dout_pin: GPIO15
|
||||||
i2s_audio_id: if_i2s_audio
|
i2s_audio_id: if_i2s_audio
|
||||||
i2s_comm_fmt: lsb
|
i2s_comm_fmt: msb # Experimental - It was 'lsb' until v2024.12.12
|
||||||
dac_type: external
|
dac_type: external
|
||||||
mode: mono
|
mode: mono
|
||||||
internal: false
|
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -358,9 +358,9 @@ tx_ultimate_easy:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
const uint8_t touch_position = static_cast<uint8_t>(touch.x);
|
const uint8_t touch_position = static_cast<uint8_t>(touch.x);
|
||||||
if (touch_position > ${TOUCH_POSITION_MAX_VALUE}) { // Check for valid range
|
if (touch_position > ${TOUCH_POSITION_MAX_VALUE}) { // Check for valid range
|
||||||
ESP_LOGE("tx_ultimate_easy", "Invalid long-touch position: %" PRIu8, touch_position);
|
ESP_LOGE("core_hw_touch", "Invalid long-touch position: %" PRIu8, touch_position);
|
||||||
} else {
|
} else {
|
||||||
ESP_LOGI("tx_ultimate_easy", "Long-touch released at position %" PRIu8, touch_position);
|
ESP_LOGI("core_hw_touch", "Long-touch released at position %" PRIu8, touch_position);
|
||||||
}
|
}
|
||||||
|
|
||||||
on_multi_touch_release:
|
on_multi_touch_release:
|
||||||
@@ -373,21 +373,21 @@ tx_ultimate_easy:
|
|||||||
type: multi_touch
|
type: multi_touch
|
||||||
action: release
|
action: release
|
||||||
position: !lambda return touch.x;
|
position: !lambda return touch.x;
|
||||||
- lambda: ESP_LOGI("tx_ultimate_easy", "Multi-touch released");
|
- lambda: ESP_LOGI("core_hw_touch", "Multi-touch released");
|
||||||
- script.execute: touch_on_multi_touch_release
|
- script.execute: touch_on_multi_touch_release
|
||||||
|
|
||||||
on_press:
|
on_press:
|
||||||
- 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
|
||||||
ESP_LOGE("tx_ultimate_easy", "Invalid touch position: %" PRIu8, position);
|
ESP_LOGE("core_hw_touch", "Invalid touch position: %" PRIu8, position);
|
||||||
} else {
|
} else {
|
||||||
ESP_LOGI("tx_ultimate_easy", "Pressed at position %" PRIu8, position);
|
ESP_LOGI("core_hw_touch", "Pressed at position %" PRIu8, position);
|
||||||
touch_on_press->execute(static_cast<uint8_t>(touch.button), position);
|
touch_on_press->execute(static_cast<uint8_t>(touch.button), position);
|
||||||
}
|
}
|
||||||
|
|
||||||
on_release:
|
on_release:
|
||||||
- lambda: ESP_LOGI("tx_ultimate_easy", "Released");
|
- lambda: ESP_LOGI("core_hw_touch", "Released");
|
||||||
- script.execute: touch_on_release
|
- script.execute: touch_on_release
|
||||||
|
|
||||||
on_swipe_left:
|
on_swipe_left:
|
||||||
@@ -399,12 +399,12 @@ tx_ultimate_easy:
|
|||||||
domain: touch
|
domain: touch
|
||||||
type: swipe
|
type: swipe
|
||||||
action: !lambda |-
|
action: !lambda |-
|
||||||
return sl_tx_model_format->state == "${TX_MODEL_FORMAT_US_TEXT}" ? "left" : "down";
|
return sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}" ? "left" : "down";
|
||||||
swipe-direction: !lambda |-
|
swipe-direction: !lambda |-
|
||||||
return sl_tx_model_format->state == "${TX_MODEL_FORMAT_US_TEXT}" ? "left" : "down";
|
return sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}" ? "left" : "down";
|
||||||
position: !lambda return touch.x;
|
position: !lambda return touch.x;
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
ESP_LOGI("tx_ultimate_easy", "Swipe %s", sl_tx_model_format->state == "${TX_MODEL_FORMAT_US_TEXT}"
|
ESP_LOGI("core_hw_touch", "Swipe %s", sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}"
|
||||||
? "left"
|
? "left"
|
||||||
: "down");
|
: "down");
|
||||||
- script.execute: touch_swipe_left
|
- script.execute: touch_swipe_left
|
||||||
@@ -418,21 +418,21 @@ tx_ultimate_easy:
|
|||||||
domain: touch
|
domain: touch
|
||||||
type: swipe
|
type: swipe
|
||||||
action: !lambda |-
|
action: !lambda |-
|
||||||
return sl_tx_model_format->state == "${TX_MODEL_FORMAT_US_TEXT}" ? "right" : "up";
|
return sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}" ? "right" : "up";
|
||||||
swipe-direction: !lambda |-
|
swipe-direction: !lambda |-
|
||||||
return sl_tx_model_format->state == "${TX_MODEL_FORMAT_US_TEXT}" ? "right" : "up";
|
return sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}" ? "right" : "up";
|
||||||
position: !lambda return touch.x;
|
position: !lambda return touch.x;
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
ESP_LOGI("tx_ultimate_easy", "Swipe %s", sl_tx_model_format->state == "${TX_MODEL_FORMAT_US_TEXT}"
|
ESP_LOGI("core_hw_touch", "Swipe %s", sl_tx_model_format->state == "${TX_MODEL_FORMAT_EU_TEXT}"
|
||||||
? "right"
|
? "right"
|
||||||
: "up");
|
: "up");
|
||||||
- script.execute: touch_swipe_right
|
- script.execute: touch_swipe_right
|
||||||
|
|
||||||
on_touch_event:
|
on_touch_event:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
ESP_LOGD("tx_ultimate_easy", "Touch event:");
|
ESP_LOGD("core_hw_touch", "Touch event:");
|
||||||
ESP_LOGD("tx_ultimate_easy", " State: %i (%s)", touch.state, touch.state_str.c_str());
|
ESP_LOGD("core_hw_touch", " State: %i (%s)", touch.state, touch.state_str.c_str());
|
||||||
ESP_LOGD("tx_ultimate_easy", " Position: %i", touch.x);
|
ESP_LOGD("core_hw_touch", " Position: %i", touch.x);
|
||||||
|
|
||||||
uart:
|
uart:
|
||||||
- id: uart_touch
|
- id: uart_touch
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2024.12.9
|
2024.12.16
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
version: 2024.12.9
|
version: 2024.12.16
|
||||||
|
|||||||
Reference in New Issue
Block a user