Compare commits
28 Commits
v2024.12.4
...
v2024.12.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd4f6836c9 | ||
|
|
98ea8810f8 | ||
|
|
552b83f065 | ||
|
|
ee6f565447 | ||
|
|
aa4e27ec35 | ||
|
|
8a509cedc8 | ||
|
|
ddea93af6a | ||
|
|
dc99319397 | ||
|
|
5ae45fff63 | ||
|
|
bbbaeeb0d4 | ||
|
|
a9f82d958f | ||
|
|
c07e4f195a | ||
|
|
f1f545198b | ||
|
|
d87b86bfca | ||
|
|
f11840d2bc | ||
|
|
42afe71365 | ||
|
|
09e9d340fc | ||
|
|
7850d16aeb | ||
|
|
1f2e60e7db | ||
|
|
dd25e5dbba | ||
|
|
75f4245fe1 | ||
|
|
3b7f811876 | ||
|
|
d403bc2aa9 | ||
|
|
5d780f162e | ||
|
|
0e53dfd3cd | ||
|
|
23b633cdcb | ||
|
|
b1187332fb | ||
|
|
669cc2f2c2 |
40
.github/workflows/release_tag.yml
vendored
40
.github/workflows/release_tag.yml
vendored
@@ -1,40 +0,0 @@
|
|||||||
# This GitHub Actions workflow updates the "stable" and "latest" Git tags
|
|
||||||
# to point to the tag associated with a newly published release. It performs
|
|
||||||
# the following steps:
|
|
||||||
# 1. Checks out the repository code with full history.
|
|
||||||
# 2. Configures Git with a generic user for the action.
|
|
||||||
# 3. Moves and forcibly pushes the "stable" and "latest" tags to align with
|
|
||||||
# the tag of the newly published release.
|
|
||||||
# This ensures that "stable" and "latest" always point to the most recent release.
|
|
||||||
---
|
|
||||||
name: Update Tags
|
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-tags:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@main
|
|
||||||
with:
|
|
||||||
fetch-depth: '0'
|
|
||||||
|
|
||||||
- name: Set up Git
|
|
||||||
run: |
|
|
||||||
git config --local user.email "action@github.com"
|
|
||||||
git config --local user.name "GitHub Action"
|
|
||||||
|
|
||||||
- name: Move and push stable tag
|
|
||||||
run: |
|
|
||||||
git tag -f stable ${{ github.event.release.tag_name }}
|
|
||||||
git push -f origin stable
|
|
||||||
|
|
||||||
- name: Move and push latest tag
|
|
||||||
run: |
|
|
||||||
git tag -f latest ${{ github.event.release.tag_name }}
|
|
||||||
git push -f origin latest
|
|
||||||
...
|
|
||||||
4
.github/workflows/validate_esphome.yml
vendored
4
.github/workflows/validate_esphome.yml
vendored
@@ -30,8 +30,6 @@ jobs:
|
|||||||
|
|
||||||
build_basic:
|
build_basic:
|
||||||
name: Basic
|
name: Basic
|
||||||
needs:
|
|
||||||
- code_scan
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@main
|
- uses: actions/checkout@main
|
||||||
@@ -42,7 +40,6 @@ jobs:
|
|||||||
|
|
||||||
build_bluetooth_proxy_4:
|
build_bluetooth_proxy_4:
|
||||||
name: Bluetooth Proxy (IDF)
|
name: Bluetooth Proxy (IDF)
|
||||||
needs: build_basic
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@main
|
- uses: actions/checkout@main
|
||||||
@@ -53,7 +50,6 @@ jobs:
|
|||||||
|
|
||||||
build_bluetooth_proxy_53:
|
build_bluetooth_proxy_53:
|
||||||
name: Bluetooth Proxy (IDF v5.3)
|
name: Bluetooth Proxy (IDF v5.3)
|
||||||
needs: build_basic
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@main
|
- uses: actions/checkout@main
|
||||||
|
|||||||
4
.github/workflows/validate_esphome_beta.yml
vendored
4
.github/workflows/validate_esphome_beta.yml
vendored
@@ -47,8 +47,6 @@ jobs:
|
|||||||
|
|
||||||
build_basic:
|
build_basic:
|
||||||
name: Basic
|
name: Basic
|
||||||
needs:
|
|
||||||
- code_scan
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@main
|
- uses: actions/checkout@main
|
||||||
@@ -60,7 +58,6 @@ jobs:
|
|||||||
|
|
||||||
build_bluetooth_proxy_4:
|
build_bluetooth_proxy_4:
|
||||||
name: Bluetooth Proxy (IDF)
|
name: Bluetooth Proxy (IDF)
|
||||||
needs: build_basic
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@main
|
- uses: actions/checkout@main
|
||||||
@@ -72,7 +69,6 @@ jobs:
|
|||||||
|
|
||||||
build_bluetooth_proxy_53:
|
build_bluetooth_proxy_53:
|
||||||
name: Bluetooth Proxy (IDF v5.3)
|
name: Bluetooth Proxy (IDF v5.3)
|
||||||
needs: build_basic
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@main
|
- uses: actions/checkout@main
|
||||||
|
|||||||
88
.github/workflows/versioning.yml
vendored
88
.github/workflows/versioning.yml
vendored
@@ -1,6 +1,11 @@
|
|||||||
# Workflow for managing versioning and tagging
|
# This GitHub Actions workflow handles version bumping and tag updates.
|
||||||
|
# It can be triggered either by:
|
||||||
|
# 1. Pushing to main branch - automatically bumps version and updates tags
|
||||||
|
# 2. Manual dispatch - allows independent control over stable and latest tags
|
||||||
|
|
||||||
---
|
---
|
||||||
name: Version Bump and Tag
|
|
||||||
|
name: Version and Tags
|
||||||
|
|
||||||
on: # yamllint disable-line rule:truthy
|
on: # yamllint disable-line rule:truthy
|
||||||
push:
|
push:
|
||||||
@@ -9,34 +14,93 @@ on: # yamllint disable-line rule:truthy
|
|||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**/VERSION'
|
- '**/VERSION'
|
||||||
- '**/VERSION_YAML'
|
- '**/VERSION_YAML'
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
update_stable:
|
update_stable:
|
||||||
description: "Update stable tag?"
|
description: "Update stable tag?"
|
||||||
required: true
|
required: true
|
||||||
default: "false"
|
default: false
|
||||||
|
type: boolean
|
||||||
|
update_latest:
|
||||||
|
description: "Update latest tag?"
|
||||||
|
required: true
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
versioning:
|
version-and-tag:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: "actions/checkout@v4"
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up Git
|
- name: Set up Git
|
||||||
run: |
|
run: |
|
||||||
git config user.name "GitHub Actions"
|
git config user.name "GitHub Actions"
|
||||||
git config user.email "actions@github.com"
|
git config user.email "actions@github.com"
|
||||||
|
|
||||||
- name: Bump Version
|
- name: Bump version
|
||||||
run: |
|
run: |
|
||||||
chmod +x "./versioning/bump_version.sh"
|
chmod +x ./versioning/bump_version.sh
|
||||||
"./versioning/bump_version.sh"
|
./versioning/bump_version.sh
|
||||||
|
|
||||||
- name: Push Changes and Tags
|
- name: Push Changes and Tags
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
git push "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" main
|
git push origin main
|
||||||
git push "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" --tags
|
git push origin --tags --force
|
||||||
|
|
||||||
|
- name: Update stable tag
|
||||||
|
if: |
|
||||||
|
success() && (
|
||||||
|
github.event_name == 'workflow_dispatch' && inputs.update_stable ||
|
||||||
|
github.event_name == 'push'
|
||||||
|
)
|
||||||
|
run: |
|
||||||
|
# Verify version bump was successful
|
||||||
|
if [ ! -f "./versioning/VERSION" ]; then
|
||||||
|
echo "Error: VERSION file not found. Version bump may have failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Backup existing tag
|
||||||
|
if git rev-parse --verify stable >/dev/null 2>&1; then
|
||||||
|
OLD_STABLE=$(git rev-parse stable)
|
||||||
|
echo "Backing up current stable tag ($OLD_STABLE)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update tag
|
||||||
|
NEW_VERSION=$(cat ./versioning/VERSION)
|
||||||
|
echo "Updating stable tag to $NEW_VERSION"
|
||||||
|
git tag -fa stable -m "Update stable tag"
|
||||||
|
git push origin stable --force
|
||||||
|
|
||||||
|
- name: Update latest tag
|
||||||
|
if: |
|
||||||
|
success() && (
|
||||||
|
github.event_name == 'workflow_dispatch' && inputs.update_latest ||
|
||||||
|
github.event_name == 'push'
|
||||||
|
)
|
||||||
|
run: |
|
||||||
|
# Verify version bump was successful
|
||||||
|
if [ ! -f "./versioning/VERSION" ]; then
|
||||||
|
echo "Error: VERSION file not found. Version bump may have failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Backup existing tag
|
||||||
|
if git rev-parse --verify latest >/dev/null 2>&1; then
|
||||||
|
OLD_LATEST=$(git rev-parse latest)
|
||||||
|
echo "Backing up current latest tag ($OLD_LATEST)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update tag
|
||||||
|
NEW_VERSION=$(cat ./versioning/VERSION)
|
||||||
|
echo "Updating latest tag to $NEW_VERSION"
|
||||||
|
git tag -fa latest -m "Update latest tag"
|
||||||
|
git push origin latest --force
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -26,6 +26,12 @@ substitutions:
|
|||||||
BUTTON_PRESS_TIMEOUT: '10000' # Ignore if button is pressed for longer than this time, in msec
|
BUTTON_PRESS_TIMEOUT: '10000' # Ignore if button is pressed for longer than this time, in msec
|
||||||
BUTTON_LONG_PRESS_DELAY: '800' # The time to wait to consider a long press, in msec
|
BUTTON_LONG_PRESS_DELAY: '800' # The time to wait to consider a long press, in msec
|
||||||
|
|
||||||
|
# Button numbers constants
|
||||||
|
BUTTON_1_ID: '1'
|
||||||
|
BUTTON_2_ID: '2'
|
||||||
|
BUTTON_3_ID: '3'
|
||||||
|
BUTTON_4_ID: '4'
|
||||||
|
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
- &binary_sensor_button_base
|
- &binary_sensor_button_base
|
||||||
id: bs_button_2
|
id: bs_button_2
|
||||||
|
|||||||
@@ -795,12 +795,12 @@ script:
|
|||||||
case 1:
|
case 1:
|
||||||
if (light_index >= id(gb_lights_1).size()) {
|
if (light_index >= id(gb_lights_1).size()) {
|
||||||
ESP_LOGE("core_hw_leds", "Invalid set with %s light for Relay %" PRIu8,
|
ESP_LOGE("core_hw_leds", "Invalid set with %s light for Relay %" PRIu8,
|
||||||
light_mode_group_1.c_str(), light_index);
|
light_mode_group_1.c_str(), light_index+1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (state and !id(gb_lights_1)[light_index]->current_values.is_on()) {
|
if (state and !id(gb_lights_1)[light_index]->current_values.is_on()) {
|
||||||
ESP_LOGI("core_hw_leds", "Turn-on %s light for Relay %" PRIu8,
|
ESP_LOGI("core_hw_leds", "Turn-on %s light for Relay %" PRIu8,
|
||||||
light_mode_group_1.c_str(), light_index);
|
light_mode_group_1.c_str(), light_index+1);
|
||||||
auto call = id(gb_lights_1)[light_index]->turn_on();
|
auto call = id(gb_lights_1)[light_index]->turn_on();
|
||||||
if (LIGHT_TRANSITION_TURN_ON > 0)
|
if (LIGHT_TRANSITION_TURN_ON > 0)
|
||||||
call.set_transition_length(LIGHT_TRANSITION_TURN_ON); // in ms
|
call.set_transition_length(LIGHT_TRANSITION_TURN_ON); // in ms
|
||||||
@@ -809,7 +809,7 @@ script:
|
|||||||
call.perform();
|
call.perform();
|
||||||
} else if (!state and id(gb_lights_1)[light_index]->current_values.is_on()) {
|
} else if (!state and id(gb_lights_1)[light_index]->current_values.is_on()) {
|
||||||
ESP_LOGI("core_hw_leds", "Turn-off %s light for Relay %" PRIu8,
|
ESP_LOGI("core_hw_leds", "Turn-off %s light for Relay %" PRIu8,
|
||||||
light_mode_group_1.c_str(), light_index);
|
light_mode_group_1.c_str(), light_index+1);
|
||||||
auto call = id(gb_lights_1)[light_index]->turn_off();
|
auto call = id(gb_lights_1)[light_index]->turn_off();
|
||||||
if (LIGHT_TRANSITION_TURN_OFF > 0)
|
if (LIGHT_TRANSITION_TURN_OFF > 0)
|
||||||
call.set_transition_length(LIGHT_TRANSITION_TURN_OFF); // in ms
|
call.set_transition_length(LIGHT_TRANSITION_TURN_OFF); // in ms
|
||||||
@@ -819,12 +819,12 @@ script:
|
|||||||
case 2:
|
case 2:
|
||||||
if (light_index >= id(gb_lights_2).size()) {
|
if (light_index >= id(gb_lights_2).size()) {
|
||||||
ESP_LOGE("core_hw_leds", "Invalid set with %s light for Relay %" PRIu8,
|
ESP_LOGE("core_hw_leds", "Invalid set with %s light for Relay %" PRIu8,
|
||||||
light_mode_group_2.c_str(), light_index);
|
light_mode_group_2.c_str(), light_index+1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (state and !id(gb_lights_2)[light_index]->current_values.is_on()) {
|
if (state and !id(gb_lights_2)[light_index]->current_values.is_on()) {
|
||||||
ESP_LOGI("core_hw_leds", "Turn-on %s light for Relay %" PRIu8,
|
ESP_LOGI("core_hw_leds", "Turn-on %s light for Relay %" PRIu8,
|
||||||
light_mode_group_2.c_str(), light_index);
|
light_mode_group_2.c_str(), light_index+1);
|
||||||
auto call = id(gb_lights_2)[light_index]->turn_on();
|
auto call = id(gb_lights_2)[light_index]->turn_on();
|
||||||
if (LIGHT_TRANSITION_TURN_ON > 0)
|
if (LIGHT_TRANSITION_TURN_ON > 0)
|
||||||
call.set_transition_length(LIGHT_TRANSITION_TURN_ON); // in ms
|
call.set_transition_length(LIGHT_TRANSITION_TURN_ON); // in ms
|
||||||
@@ -833,7 +833,7 @@ script:
|
|||||||
call.perform();
|
call.perform();
|
||||||
} else if (!state and id(gb_lights_2)[light_index]->current_values.is_on()) {
|
} else if (!state and id(gb_lights_2)[light_index]->current_values.is_on()) {
|
||||||
ESP_LOGI("core_hw_leds", "Turn-off %s light for Relay %" PRIu8,
|
ESP_LOGI("core_hw_leds", "Turn-off %s light for Relay %" PRIu8,
|
||||||
light_mode_group_2.c_str(), light_index);
|
light_mode_group_2.c_str(), light_index+1);
|
||||||
auto call = id(gb_lights_2)[light_index]->turn_off();
|
auto call = id(gb_lights_2)[light_index]->turn_off();
|
||||||
if (LIGHT_TRANSITION_TURN_OFF > 0)
|
if (LIGHT_TRANSITION_TURN_OFF > 0)
|
||||||
call.set_transition_length(LIGHT_TRANSITION_TURN_OFF); // in ms
|
call.set_transition_length(LIGHT_TRANSITION_TURN_OFF); // in ms
|
||||||
|
|||||||
@@ -11,6 +11,11 @@
|
|||||||
##### - For normal system use, modifications to this file are NOT required. #####
|
##### - For normal system use, modifications to this file are NOT required. #####
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
---
|
---
|
||||||
|
substitutions:
|
||||||
|
RELAY_MODE_TEXT_SWITCH: "Switch"
|
||||||
|
RELAY_MODE_TEXT_LIGHT: "Light"
|
||||||
|
RELAY_MODE_TEXT_NOT_USED: "Not in use"
|
||||||
|
|
||||||
globals:
|
globals:
|
||||||
- id: boot_initialization_relays
|
- id: boot_initialization_relays
|
||||||
type: bool
|
type: bool
|
||||||
@@ -19,24 +24,82 @@ globals:
|
|||||||
|
|
||||||
light:
|
light:
|
||||||
# These lights are used for the physical relays to be shown as lights
|
# These lights are used for the physical relays to be shown as lights
|
||||||
- &light_binary_base
|
- id: light_output_1
|
||||||
id: light_output_1
|
|
||||||
name: Light output 1
|
name: Light output 1
|
||||||
output: output_relay_1
|
output: output_relay_1
|
||||||
platform: binary
|
platform: binary
|
||||||
internal: true
|
internal: true
|
||||||
|
on_turn_on:
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- switch.is_off: sw_relay_1
|
||||||
|
then:
|
||||||
|
- switch.turn_on: sw_relay_1
|
||||||
|
on_turn_off:
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- switch.is_on: sw_relay_1
|
||||||
|
then:
|
||||||
|
- switch.turn_off: sw_relay_1
|
||||||
- id: light_output_2
|
- id: light_output_2
|
||||||
name: Light output 2
|
name: Light output 2
|
||||||
output: output_relay_2
|
output: output_relay_2
|
||||||
<<: *light_binary_base
|
platform: binary
|
||||||
|
internal: true
|
||||||
|
on_turn_on:
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- switch.is_off: sw_relay_2
|
||||||
|
then:
|
||||||
|
- switch.turn_on: sw_relay_2
|
||||||
|
on_turn_off:
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- switch.is_on: sw_relay_2
|
||||||
|
then:
|
||||||
|
- switch.turn_off: sw_relay_2
|
||||||
- id: light_output_3
|
- id: light_output_3
|
||||||
name: Light output 3
|
name: Light output 3
|
||||||
output: output_relay_3
|
output: output_relay_3
|
||||||
<<: *light_binary_base
|
platform: binary
|
||||||
|
internal: true
|
||||||
|
on_turn_on:
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- switch.is_off: sw_relay_3
|
||||||
|
then:
|
||||||
|
- switch.turn_on: sw_relay_3
|
||||||
|
on_turn_off:
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- switch.is_on: sw_relay_3
|
||||||
|
then:
|
||||||
|
- switch.turn_off: sw_relay_3
|
||||||
- id: light_output_4
|
- id: light_output_4
|
||||||
name: Light output 4
|
name: Light output 4
|
||||||
output: output_relay_4
|
output: output_relay_4
|
||||||
<<: *light_binary_base
|
platform: binary
|
||||||
|
internal: true
|
||||||
|
on_turn_on:
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- switch.is_off: sw_relay_4
|
||||||
|
then:
|
||||||
|
- switch.turn_on: sw_relay_4
|
||||||
|
on_turn_off:
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- switch.is_on: sw_relay_4
|
||||||
|
then:
|
||||||
|
- switch.turn_off: sw_relay_4
|
||||||
|
|
||||||
output:
|
output:
|
||||||
- id: output_relay_1
|
- id: output_relay_1
|
||||||
@@ -127,24 +190,20 @@ script:
|
|||||||
|
|
||||||
// Toggle relay if corresponding button action is enabled
|
// Toggle relay if corresponding button action is enabled
|
||||||
switch (button_id) {
|
switch (button_id) {
|
||||||
case 1:
|
case ${BUTTON_1_ID}:
|
||||||
if (sl_button_1_action->active_index().has_value() and
|
if (sl_button_1_action->state != "${RELAY_MODE_TEXT_NOT_USED}")
|
||||||
sl_button_1_action->active_index().value() == 1)
|
|
||||||
sw_relay_1->toggle();
|
sw_relay_1->toggle();
|
||||||
break;
|
break;
|
||||||
case 2:
|
case ${BUTTON_2_ID}:
|
||||||
if (sl_button_2_action->active_index().has_value() and
|
if (sl_button_2_action->state != "${RELAY_MODE_TEXT_NOT_USED}")
|
||||||
sl_button_2_action->active_index().value() == 1)
|
|
||||||
sw_relay_2->toggle();
|
sw_relay_2->toggle();
|
||||||
break;
|
break;
|
||||||
case 3:
|
case ${BUTTON_3_ID}:
|
||||||
if (sl_button_3_action->active_index().has_value() and
|
if (sl_button_3_action->state != "${RELAY_MODE_TEXT_NOT_USED}")
|
||||||
sl_button_3_action->active_index().value() == 1)
|
|
||||||
sw_relay_3->toggle();
|
sw_relay_3->toggle();
|
||||||
break;
|
break;
|
||||||
case 4:
|
case ${BUTTON_4_ID}:
|
||||||
if (sl_button_4_action->active_index().has_value() and
|
if (sl_button_4_action->state != "${RELAY_MODE_TEXT_NOT_USED}")
|
||||||
sl_button_4_action->active_index().value() == 1)
|
|
||||||
sw_relay_4->toggle();
|
sw_relay_4->toggle();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -226,12 +285,13 @@ script:
|
|||||||
select:
|
select:
|
||||||
- &relay_select_mode_base
|
- &relay_select_mode_base
|
||||||
id: sl_relay_1_mode
|
id: sl_relay_1_mode
|
||||||
name: Relay 1 mode
|
name: Relay 1 display mode
|
||||||
platform: template
|
platform: template
|
||||||
options:
|
options:
|
||||||
- "Relay"
|
- "${RELAY_MODE_TEXT_SWITCH}"
|
||||||
- "Light"
|
- "${RELAY_MODE_TEXT_LIGHT}"
|
||||||
- "Not in use"
|
- "${RELAY_MODE_TEXT_NOT_USED}"
|
||||||
|
initial_option: "${RELAY_MODE_TEXT_SWITCH}"
|
||||||
optimistic: true
|
optimistic: true
|
||||||
restore_value: true
|
restore_value: true
|
||||||
internal: true
|
internal: true
|
||||||
@@ -240,44 +300,107 @@ select:
|
|||||||
icon: mdi:dip-switch
|
icon: mdi:dip-switch
|
||||||
|
|
||||||
- id: sl_relay_2_mode
|
- id: sl_relay_2_mode
|
||||||
name: Relay 2 mode
|
name: Relay 2 display mode
|
||||||
<<: *relay_select_mode_base
|
<<: *relay_select_mode_base
|
||||||
|
|
||||||
- id: sl_relay_3_mode
|
- id: sl_relay_3_mode
|
||||||
name: Relay 3 mode
|
name: Relay 3 display mode
|
||||||
<<: *relay_select_mode_base
|
<<: *relay_select_mode_base
|
||||||
|
|
||||||
- id: sl_relay_4_mode
|
- id: sl_relay_4_mode
|
||||||
name: Relay 4 mode
|
name: Relay 4 display mode
|
||||||
<<: *relay_select_mode_base
|
<<: *relay_select_mode_base
|
||||||
|
|
||||||
switch:
|
switch:
|
||||||
- &relay_switch_base
|
- id: sw_relay_1
|
||||||
id: sw_relay_1
|
|
||||||
name: Relay 1
|
name: Relay 1
|
||||||
platform: output
|
|
||||||
output: output_relay_1
|
output: output_relay_1
|
||||||
|
platform: output
|
||||||
restore_mode: RESTORE_DEFAULT_OFF
|
restore_mode: RESTORE_DEFAULT_OFF
|
||||||
internal: true
|
internal: true
|
||||||
on_turn_on:
|
on_turn_on:
|
||||||
then:
|
then:
|
||||||
- script.execute: show_relay_status
|
- script.execute: show_relay_status
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- light.is_off: light_output_1
|
||||||
|
then:
|
||||||
|
light.turn_on: light_output_1
|
||||||
on_turn_off:
|
on_turn_off:
|
||||||
then:
|
then:
|
||||||
- script.execute: show_relay_status
|
- script.execute: show_relay_status
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- light.is_on: light_output_1
|
||||||
|
then:
|
||||||
|
- light.turn_off: light_output_1
|
||||||
|
|
||||||
- id: sw_relay_2
|
- id: sw_relay_2
|
||||||
name: Relay 2
|
name: Relay 2
|
||||||
output: output_relay_2
|
output: output_relay_2
|
||||||
<<: *relay_switch_base
|
platform: output
|
||||||
|
restore_mode: RESTORE_DEFAULT_OFF
|
||||||
|
internal: true
|
||||||
|
on_turn_on:
|
||||||
|
then:
|
||||||
|
- script.execute: show_relay_status
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- light.is_off: light_output_2
|
||||||
|
then:
|
||||||
|
light.turn_on: light_output_2
|
||||||
|
on_turn_off:
|
||||||
|
then:
|
||||||
|
- script.execute: show_relay_status
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- light.is_on: light_output_2
|
||||||
|
then:
|
||||||
|
- light.turn_off: light_output_2
|
||||||
|
|
||||||
- id: sw_relay_3
|
- id: sw_relay_3
|
||||||
name: Relay 3
|
name: Relay 3
|
||||||
output: output_relay_3
|
output: output_relay_3
|
||||||
<<: *relay_switch_base
|
platform: output
|
||||||
|
restore_mode: RESTORE_DEFAULT_OFF
|
||||||
|
internal: true
|
||||||
|
on_turn_on:
|
||||||
|
then:
|
||||||
|
- script.execute: show_relay_status
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- light.is_off: light_output_3
|
||||||
|
then:
|
||||||
|
- light.turn_on: light_output_3
|
||||||
|
on_turn_off:
|
||||||
|
then:
|
||||||
|
- script.execute: show_relay_status
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- light.is_on: light_output_3
|
||||||
|
then:
|
||||||
|
- light.turn_off: light_output_3
|
||||||
|
|
||||||
- id: sw_relay_4
|
- id: sw_relay_4
|
||||||
name: Relay 4
|
name: Relay 4
|
||||||
output: output_relay_4
|
output: output_relay_4
|
||||||
<<: *relay_switch_base
|
platform: output
|
||||||
|
restore_mode: RESTORE_DEFAULT_OFF
|
||||||
|
internal: true
|
||||||
|
on_turn_on:
|
||||||
|
then:
|
||||||
|
- script.execute: show_relay_status
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- light.is_off: light_output_4
|
||||||
|
then:
|
||||||
|
- light.turn_on: light_output_4
|
||||||
|
on_turn_off:
|
||||||
|
then:
|
||||||
|
- script.execute: show_relay_status
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
- light.is_on: light_output_4
|
||||||
|
then:
|
||||||
|
- light.turn_off: light_output_4
|
||||||
...
|
...
|
||||||
|
|||||||
77
README.md
77
README.md
@@ -1,19 +1,20 @@
|
|||||||
# TX Ultimate Easy
|
# TX Ultimate Easy
|
||||||
|
|
||||||
<!-- markdownlint-disable MD033 -->
|
[![Version][version-shield]](https://github.com/edwardtfn/TX-Ultimate-Easy/tags)
|
||||||
<a href="https://github.com/edwardtfn/TX-Ultimate-Easy/commits/main" target="_blank">![GitHub Activity][commits-shield]</a>
|
[![GitHub Activity][commits-shield]](https://github.com/edwardtfn/TX-Ultimate-Easy/commits/main)
|
||||||
<a href="LICENSE" target="_blank">![License][license-shield]</a>
|
[![License][license-shield]](LICENSE)
|
||||||
<a href="https://github.com/edwardtfn/TX-Ultimate-Easy/commits/main" target="_blank">![GitHub Last Commit][last-commit-shield]</a>
|
[![GitHub Last Commit][last-commit-shield]](https://github.com/edwardtfn/TX-Ultimate-Easy/commits/main)
|
||||||
<a href="https://esphome.io/" target="_blank">![ESPHome][esphome-shield]</a>
|
[![ESPHome][esphome-shield]](https://esphome.io/)
|
||||||
<a href="https://discord.gg/Db6WJWzWuf" target="_blank">![Discord][discord-shield]</a>
|
[![Discord][discord-shield]](https://discord.gg/Db6WJWzWuf)
|
||||||
<a href="https://www.buymeacoffee.com/edwardfirmo" target="_blank">![Buy me an ice-cream][buymeacoffee-shield]</a>
|
[![Buy me an ice-cream][buymeacoffee-shield]](https://www.buymeacoffee.com/edwardfirmo)
|
||||||
<!-- markdownlint-enable MD033 -->
|
|
||||||
|
|
||||||
<!-- markdownlint-disable MD013 -->
|
<!-- markdownlint-disable MD013 -->
|
||||||
|  | TX Ultimate Easy provides custom ESPHome firmware for Sonoff TX Ultimate devices. Our project focuses on user-friendly configuration through the Home Assistant UI, eliminating the need for manual YAML editing. Whether you're new to home automation or an experienced user, TX Ultimate Easy makes it simple to manage your device. |
|
|  | TX Ultimate Easy provides custom ESPHome firmware for Sonoff TX Ultimate devices. Our project focuses on user-friendly configuration through the Home Assistant UI, eliminating the need for manual YAML editing. Whether you're new to home automation or an experienced user, TX Ultimate Easy makes it simple to manage your device. |
|
||||||
| --- | :-- |
|
| --- | :-- |
|
||||||
<!-- markdownlint-enable MD013 -->
|
<!-- markdownlint-enable MD013 -->
|
||||||
|
|
||||||
|
[version-shield]: https://img.shields.io/github/v/tag/edwardtfn/TX-Ultimate-Easy?label=version
|
||||||
|
[version]: https://github.com/edwardtfn/TX-Ultimate-Easy/tags
|
||||||
[commits-shield]: https://img.shields.io/github/commit-activity/y/edwardtfn/TX-Ultimate-Easy
|
[commits-shield]: https://img.shields.io/github/commit-activity/y/edwardtfn/TX-Ultimate-Easy
|
||||||
[commits]: https://github.com/edwardtfn/TX-Ultimate-Easy/commits/main
|
[commits]: https://github.com/edwardtfn/TX-Ultimate-Easy/commits/main
|
||||||
[license-shield]: https://img.shields.io/github/license/edwardtfn/TX-Ultimate-Easy
|
[license-shield]: https://img.shields.io/github/license/edwardtfn/TX-Ultimate-Easy
|
||||||
@@ -35,7 +36,60 @@ TX Ultimate Easy exposes your device's components (sensors, touch panel, relays,
|
|||||||
- Use device triggers and states in your Home Assistant automations and scripts
|
- Use device triggers and states in your Home Assistant automations and scripts
|
||||||
- Configure device behavior through Home Assistant's service calls
|
- Configure device behavior through Home Assistant's service calls
|
||||||
|
|
||||||
All automation capabilities are handled through Home Assistant's native automation system - this project focuses on providing reliable device integration rather than implementing its own automation tools.
|
All automation capabilities are handled through Home Assistant's native automation system - this project focuses on providing reliable
|
||||||
|
device integration rather than implementing its own automation tools.
|
||||||
|
|
||||||
|
### Event-Based Automation
|
||||||
|
|
||||||
|
TX Ultimate Easy uses Home Assistant's native Events system for reliable automation triggers.
|
||||||
|
While sensors show the current state (e.g., button pressed/not pressed), events capture-specific actions like clicks, swipes, and long presses.
|
||||||
|
|
||||||
|
To view available events:
|
||||||
|
|
||||||
|
1. Go to Developer Tools in Home Assistant
|
||||||
|
2. Select the "Events" tab
|
||||||
|
3. Enter `esphome.tx_ultimate_easy` in the "Event to subscribe to" field
|
||||||
|
4. Click "Start listening"
|
||||||
|
5. Interact with your device to see events in real-time
|
||||||
|
|
||||||
|
Example event trigger in automation (YAML):
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
triggers:
|
||||||
|
- platform: event
|
||||||
|
event_type: esphome.tx_ultimate_easy
|
||||||
|
event_data:
|
||||||
|
device_name: your_device_name # Replace with your specific device name
|
||||||
|
component: bs_button_1 # Button identifier (e.g., bs_button_1, bs_button_2, bs_button_3 or bs_button_4)
|
||||||
|
event: click
|
||||||
|
actions:
|
||||||
|
- action: light.toggle
|
||||||
|
target:
|
||||||
|
entity_id: light.living_room
|
||||||
|
```
|
||||||
|
|
||||||
|
**Common event types**:
|
||||||
|
- `click`: Single press and release
|
||||||
|
- `double_click`: Two quick presses
|
||||||
|
- `long_press`: Press and hold
|
||||||
|
- `swipe_left`: Left swipe gesture
|
||||||
|
- `swipe_right`: Right swipe gesture
|
||||||
|
|
||||||
|
You can also create event-based automations through the Home Assistant UI by selecting "Event" as the trigger type and filtering by your device.
|
||||||
|
|
||||||
|
### Device Configuration
|
||||||
|
#### Relay Modes
|
||||||
|
- **Light Mode**: Exposes the relay as a light entity with brightness controls (if supported)
|
||||||
|
- **Switch Mode**: Exposes the relay as a simple on/off switch entity
|
||||||
|
|
||||||
|
#### Button Actions
|
||||||
|
- **None**: Allows using button events for custom automations
|
||||||
|
Example: Trigger scenes or complex automations through Home Assistant
|
||||||
|
- **Relay Toggle**: Direct control of the associated relay
|
||||||
|
Example: Toggle relay state with each press, independent of Home Assistant
|
||||||
|
|
||||||
|
#### Automation
|
||||||
|
All device behaviors can be customized through Home Assistant automations without relying on local device triggers.
|
||||||
|
|
||||||
## Key Features
|
## Key Features
|
||||||
|
|
||||||
@@ -103,6 +157,7 @@ We welcome contributions from the community! Here's how you can help:
|
|||||||
4. Submit a pull request targeting the `main` branch
|
4. Submit a pull request targeting the `main` branch
|
||||||
|
|
||||||
Please ensure your code follows our standards:
|
Please ensure your code follows our standards:
|
||||||
|
|
||||||
- Passes all lint checks (YAML, C++, Markdown)
|
- Passes all lint checks (YAML, C++, Markdown)
|
||||||
- Includes appropriate documentation
|
- Includes appropriate documentation
|
||||||
- Follows existing code style
|
- Follows existing code style
|
||||||
@@ -115,7 +170,9 @@ Need help? Here are your options:
|
|||||||
- **Community Chat**: Join our [Discord Server](https://discord.gg/Db6WJWzWuf) for discussions and community interaction
|
- **Community Chat**: Join our [Discord Server](https://discord.gg/Db6WJWzWuf) for discussions and community interaction
|
||||||
- **Support the Project**: Consider supporting through Buy Me a Coffee
|
- **Support the Project**: Consider supporting through Buy Me a Coffee
|
||||||
|
|
||||||
Note: For proper tracking and resolution, all bug reports and feature requests must be submitted through GitHub Issues, not Discord. The Issues page can be found at: [Issues · edwardtfn/TX-Ultimate-Easy](https://github.com/edwardtfn/TX-Ultimate-Easy/issues)
|
Note: For proper tracking and resolution:
|
||||||
|
- All bug reports and feature requests must be submitted through GitHub Issues, not Discord
|
||||||
|
- Submit issues here: [Issues · edwardtfn/TX-Ultimate-Easy](https://github.com/edwardtfn/TX-Ultimate-Easy/issues)
|
||||||
|
|
||||||
[](https://www.buymeacoffee.com/edwardfirmo)
|
[](https://www.buymeacoffee.com/edwardfirmo)
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ wifi:
|
|||||||
packages:
|
packages:
|
||||||
remote_package:
|
remote_package:
|
||||||
url: https://github.com/edwardtfn/TX-Ultimate-Easy
|
url: https://github.com/edwardtfn/TX-Ultimate-Easy
|
||||||
ref: latest
|
ref: latest # Or you can specify a version, like `ref: v2024.12.6`
|
||||||
refresh: 30s
|
refresh: 5min
|
||||||
files:
|
files:
|
||||||
- ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml
|
- ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml
|
||||||
# - ESPHome/TX-Ultimate-Easy-ESPHome_addon_ble_proxy.yaml # Adds experimental BLE proxy support (limited)
|
# - ESPHome/TX-Ultimate-Easy-ESPHome_addon_ble_proxy.yaml # Adds experimental BLE proxy support (limited)
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2024.12.4
|
2024.12.8
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
version: 2024.12.4
|
version: 2024.12.8
|
||||||
|
|||||||
Reference in New Issue
Block a user