Skip to content

Conversation

@adam0white
Copy link

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

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature-ish (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

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/

Copy link
Member

@MindFreeze MindFreeze left a 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

@frenck
Copy link
Member

frenck commented Nov 25, 2025

@copilot can you fix the CI issues here (link & check)

@frenck frenck requested a review from Copilot November 25, 2025 09:09
Copilot finished reviewing on behalf of frenck November 25, 2025 09:22
Copy link
Contributor

Copilot AI left a 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_error setting
  • 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.

@wendevlin wendevlin added the Needs UX Pull requests requiring a review from the Home Assistant design team label Nov 25, 2025
@marcinbauer85
Copy link
Member

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

Comment on lines +4 to +7
/**
* 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.
*/
Copy link
Member

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.

Copy link
Author

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

Comment on lines +454 to +466
<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"
)
)}
Copy link
Member

@karwosts karwosts Nov 25, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed Needs UX Pull requests requiring a review from the Home Assistant design team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants