-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Continue on error UI #28095
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Continue on error UI #28095
Conversation
MindFreeze
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the TypeScript issues
|
@copilot can you fix the CI issues here (link & check) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds UI support for the continue_on_error option in automation actions, which was previously only accessible through YAML mode. This feature allows users to prevent an entire automation from crashing if a single action (like controlling an unreachable device) fails.
Key Changes:
- Added a new menu item in action menus to toggle
continue_on_errorsetting - Visual indicator (icon with tooltip) displays when the option is enabled
- Added comprehensive unit tests for the toggle logic
- Updated type definitions to include the new callback in action sidebar configuration
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
test/panels/config/automation/action/continue-on-error-toggle.test.ts |
New test file with comprehensive unit tests for the continue_on_error toggle logic |
src/panels/config/automation/sidebar/ha-automation-sidebar-action.ts |
Added menu item in sidebar for toggling continue_on_error, with conditional rendering to exclude conditions |
src/panels/config/automation/action/ha-automation-action-row.ts |
Implemented the toggle function and menu item, added visual indicator icon with tooltip |
src/data/automation.ts |
Extended ActionSidebarConfig interface to include continueOnError callback |
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
|
Adding a forum feature request related to this: https://community.home-assistant.io/t/add-continue-on-error-to-the-ui-for-scripts-and-automations/743837/19 |
| /** | ||
| * Helper function that mirrors the toggle logic from ha-automation-action-row.ts | ||
| * This tests the core logic without needing to instantiate the full component. | ||
| */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this test is 100% synthetic, it doesn't test any real code from the design? I wouldn't think we would want that, doesn't seem useful to me. Otherwise it provides no benefit going forward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'll drop that commit
| <ha-svg-icon | ||
| slot="start" | ||
| .path=${(this.action as NonConditionAction) | ||
| .continue_on_error === true | ||
| ? mdiAlertCircleCheck | ||
| : mdiAlertCircleCheckOutline} | ||
| ></ha-svg-icon> | ||
| ${this._renderOverflowLabel( | ||
| this.hass.localize( | ||
| "ui.panel.config.automation.editor.actions.continue_on_error" | ||
| ) | ||
| )} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel like with just the icon changing between two very similar variants, and the label staying static, that I would really be able to tell what state this was in.
A checked/unchecked checkbox would be more intuitive maybe?
Other toggles also change their verbiage between state e.g. Enable / Disable, but I don't know if "Enable Continue on Error / Disable Continue on Error" is uncomfortably long for the dropdown.
I would maybe wait for UX review before making any changes though.
Proposed change
In Home Assistant's YAML configuration, you can add continue_on_error: true to any action in an automation. This prevents the whole automation from crashing if one light bulb is unreachable. However, this option is invisible in the Visual Editor. If a user wants to use it, they have to switch to YAML mode, adding friction for non-technical users.
Type of change
Example configuration
Additional information
Checklist
NOTE: If the added test is undesired, feel free to drop that specific commit.
If user exposed functionality or configuration variables are added/changed:
NOTE: I think the documentation isn't needed for this small change. If asked, I can update this page or another one: https://www.home-assistant.io/docs/automation/editor/