Skip to content

Add severity level to dialog automation mode #25601

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

krmarien
Copy link

@krmarien krmarien commented May 26, 2025

Breaking change

Proposed change

Add a severity level select in the dialog to change the automation mode.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (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.

If user exposed functionality or configuration variables are added/changed:

@krmarien
Copy link
Author

I have a small issue with the dropdown, some elements are hidden behind the dialog header:
image

How can I fix that?

variables?: Record<string, unknown>;
}

export type AutomationConfigMaxExceeded = "silent"
Copy link
Member

@bramkragten bramkragten May 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export type AutomationConfigMaxExceeded = "silent"
export type AutomationConfigMaxExceeded = (typeof automationConfigMaxExceededOptions)[number] | "notset";

@@ -158,6 +171,25 @@ class DialogAutomationMode extends LitElement implements HassDialog {
`
: nothing}

<div class="options">
<ha-select
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should only render this if the current mode is a max mode, so include it in the statement above.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the docs it should also be valid in other modes:

When max is exceeded (which is effectively 1 for single mode) a log message will be emitted to indicate this has happened.

@bramkragten
Copy link
Member

This is a pretty advanced setting, not sure if we should be putting this in the UI. And if we do, we probably want to hide it in a expandable or something...

@bramkragten bramkragten added the Needs UX Pull requests requiring a review from the Home Assistant design team label May 26, 2025
@krmarien
Copy link
Author

This is a pretty advanced setting, not sure if we should be putting this in the UI. And if we do, we probably want to hide it in a expandable or something...

Let me know if you want me to continue and put it in expandable section.

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.

2 participants