From 42afe71365eef04bd52c4caf84ea079114891db2 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Sun, 22 Dec 2024 23:20:39 +0100 Subject: [PATCH 1/5] Add event based automation overview Helps with #51 --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/README.md b/README.md index f3b3926..5ddc50f 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,40 @@ TX Ultimate Easy exposes your device's components (sensors, touch panel, relays, 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 +trigger: + platform: event + event_type: esphome.tx_ultimate_easy + event_data: + device_name: your_device_name + component: bs_button_1 + event: click +``` + +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**: Choose between "Light" and "Switch" modes to control how the relay appears in Home Assistant +- **Button Actions**: + - "None": Button presses only generate events, allowing full automation control + - "Relay Toggle": Button directly controls the relay, independent of Home Assistant +- **Automation Flexibility**: All automations can be managed through Home Assistant without relying on local device triggers + ## Key Features - **Home Assistant UI Configuration**: Manage all device settings directly through the Home Assistant interface @@ -104,6 +138,7 @@ We welcome contributions from the community! Here's how you can help: 4. Submit a pull request targeting the `main` branch Please ensure your code follows our standards: + - Passes all lint checks (YAML, C++, Markdown) - Includes appropriate documentation - Follows existing code style From f11840d2bc54ef301effb187e8dad80361ead17a Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Sun, 22 Dec 2024 23:23:22 +0100 Subject: [PATCH 2/5] markdownlint --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5ddc50f..7d9238c 100644 --- a/README.md +++ b/README.md @@ -36,11 +36,13 @@ TX Ultimate Easy exposes your device's components (sensors, touch panel, relays, - Use device triggers and states in your Home Assistant automations and scripts - 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. +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: @@ -151,7 +153,8 @@ Need help? Here are your options: - **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 -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. +The Issues page can be found at: [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) From d87b86bfcaf05355166174753748984e0f30a54b Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Sun, 22 Dec 2024 23:41:02 +0100 Subject: [PATCH 3/5] CodeRabbitAI --- README.md | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 7d9238c..c5a68bf 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ 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. +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: @@ -55,23 +55,35 @@ To view available events: Example event trigger in automation (YAML): ```yaml -trigger: - platform: event - event_type: esphome.tx_ultimate_easy - event_data: - device_name: your_device_name - component: bs_button_1 - event: click +triggers: + - platform: event + event_type: esphome.tx_ultimate_easy + event_data: + device_name: your_device_name + component: bs_button_1 + event: click +actions: + - action: light.toggle + target: + entity_id: light.living_room + +# Additional common event types: +# event: double_click +# event: long_press +# event: swipe_left +# event: swipe_right ``` 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**: Choose between "Light" and "Switch" modes to control how the relay appears in Home Assistant +- **Relay Modes**: + - "Light": Appears as a light entity with brightness controls (if supported) + - "Switch": Appears as a simple on/off switch entity - **Button Actions**: - - "None": Button presses only generate events, allowing full automation control - - "Relay Toggle": Button directly controls the relay, independent of Home Assistant + - "None": Example: Use button events to trigger scenes or complex automations + - "Relay Toggle": Example: Press to turn on, press again to turn off, regardless of Home Assistant state - **Automation Flexibility**: All automations can be managed through Home Assistant without relying on local device triggers ## Key Features From f1f545198bbc81a09ea5054e978ea1d6df1dde51 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Sun, 22 Dec 2024 23:47:03 +0100 Subject: [PATCH 4/5] CodeRabbitAI --- README.md | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index c5a68bf..91a7dcd 100644 --- a/README.md +++ b/README.md @@ -66,25 +66,30 @@ actions: - action: light.toggle target: entity_id: light.living_room - -# Additional common event types: -# event: double_click -# event: long_press -# event: swipe_left -# event: swipe_right ``` +**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 -- **Relay Modes**: - - "Light": Appears as a light entity with brightness controls (if supported) - - "Switch": Appears as a simple on/off switch entity -- **Button Actions**: - - "None": Example: Use button events to trigger scenes or complex automations - - "Relay Toggle": Example: Press to turn on, press again to turn off, regardless of Home Assistant state -- **Automation Flexibility**: All automations can be managed through Home Assistant without relying on local device triggers +#### Automation +All device behaviors can be customized through Home Assistant automations without relying on local device triggers. ## Key Features @@ -165,8 +170,9 @@ Need help? Here are your options: - **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 -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) From c07e4f195a51ede00ac0386925aa0ed8aa19d85e Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Sun, 22 Dec 2024 23:55:18 +0100 Subject: [PATCH 5/5] CodeRabbitAI --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 91a7dcd..79b2db7 100644 --- a/README.md +++ b/README.md @@ -59,8 +59,8 @@ triggers: - platform: event event_type: esphome.tx_ultimate_easy event_data: - device_name: your_device_name - component: bs_button_1 + 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