Compare commits

...

19 Commits

Author SHA1 Message Date
GitHub Actions
bbbaeeb0d4 Bump version to 2024.12.7 [skip-versioning] 2024-12-22 23:02:49 +00:00
Edward Firmo
a9f82d958f Merge pull request #54 from edwardtfn/event-based-automation-docs
Event based automation docs
2024-12-23 00:02:40 +01:00
Edward Firmo
c07e4f195a CodeRabbitAI 2024-12-22 23:55:18 +01:00
Edward Firmo
f1f545198b CodeRabbitAI 2024-12-22 23:47:03 +01:00
Edward Firmo
d87b86bfca CodeRabbitAI 2024-12-22 23:41:02 +01:00
Edward Firmo
f11840d2bc markdownlint 2024-12-22 23:23:22 +01:00
Edward Firmo
42afe71365 Add event based automation overview
Helps with #51
2024-12-22 23:20:39 +01:00
GitHub Actions
09e9d340fc Bump version to 2024.12.6 [skip-versioning] 2024-12-22 16:41:40 +00:00
Edward Firmo
7850d16aeb Push tag before setting latest and stable 2024-12-22 17:40:45 +01:00
Edward Firmo
1f2e60e7db Merge pull request #53 from edwardtfn/use-main-as-ref
Use `main` as reference for remote package
2024-12-22 17:23:39 +01:00
Edward Firmo
dd25e5dbba Use bump_version.sh from folder versioning 2024-12-22 17:19:59 +01:00
Edward Firmo
75f4245fe1 No need another versioning action 2024-12-22 17:16:09 +01:00
Edward Firmo
3b7f811876 Tag latest and stable only after versioning 2024-12-22 17:04:52 +01:00
Edward Firmo
d403bc2aa9 CodeRabbitAI - Remove duplicated badge reference 2024-12-22 16:41:21 +01:00
Edward Firmo
5d780f162e Add version badge 2024-12-22 16:37:05 +01:00
Edward Firmo
0e53dfd3cd CodeRabbitAI 2024-12-22 16:26:49 +01:00
Edward Firmo
23b633cdcb Run all tests in parallel
Let's see if this saves some time.
2024-12-22 16:20:51 +01:00
Edward Firmo
b1187332fb Ensure latest and stable tags are updated on push to main 2024-12-22 16:17:07 +01:00
Edward Firmo
669cc2f2c2 Use main as reference for remote package 2024-12-22 16:03:39 +01:00
8 changed files with 146 additions and 73 deletions

View File

@@ -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
...

View File

@@ -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

View File

@@ -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

View File

@@ -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
... ...

View File

@@ -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 -->
| &nbsp;![TX Ultimate Easy Logo](Assets/Logo.webp) | 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. | | &nbsp;![TX Ultimate Easy Logo](Assets/Logo.webp) | 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)
[![Buy Me a Coffee](https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png)](https://www.buymeacoffee.com/edwardfirmo) [![Buy Me a Coffee](https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png)](https://www.buymeacoffee.com/edwardfirmo)

View File

@@ -16,7 +16,7 @@ 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: main
refresh: 30s refresh: 30s
files: files:
- ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml - ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml

View File

@@ -1 +1 @@
2024.12.4 2024.12.7

View File

@@ -1 +1 @@
version: 2024.12.4 version: 2024.12.7