Skip to content
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

Simple automation trigger for Timer events #19252

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

karwosts
Copy link
Contributor

@karwosts karwosts commented Jan 3, 2024

Proposed change

I like using timer helpers for automations, but I think the experience leaves something to be desired. Even as an experienced user I still have to go review the documentation every time I want to use one, to remember how to structure the necessary manual events. I think this could be somewhat difficult for new users as well, given that the manual event trigger describes itself as an "advanced concept".

As an alternative, I propose a simpler UI "Timer trigger", which just has an entity id picker, and a select to choose a timer event to listen for. I believe this would be much more accessible than having to setup a manual event trigger.

I debated if this would need to be a "real" trigger in the backend, or if we could just wrap the existing event with a new UI, and not really need any core changes. I decided to try the latter for now, as the former sounded somewhat more difficult, and possibly unnecessary.

This change does require a one line change in core to allow the validator to accept and ignore the metadata field for triggers, similar to how we have done in other areas. I can try an additional PR for that if we think this approach is favorable.

image

image

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:

@karwosts karwosts added the Backend Change Required Requires a Backend Core Code Change label Jan 3, 2024
@bramkragten
Copy link
Member

This is great and exactly what I am working on making a plan for right now! More specific triggers.
Because of that I don't think we should add this at this point but wait for that plan to be finished, as it likely will include core and work slightly different.

@chammp
Copy link
Contributor

chammp commented Feb 19, 2024

I think it might make sense to make the Event multi selectable, i.e. checkboxes. I can think of several occasions where I'd want to trigger an automation for different timer events, and having to "multiply" the trigger definition wouldn't make sense.

Don't know how this relates to bramkragten's comment, though...

Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@github-actions github-actions bot added the stale label May 19, 2024
@silamon silamon removed the stale label May 20, 2024
@silamon
Copy link
Contributor

silamon commented Jun 21, 2024

This is great and exactly what I am working on making a plan for right now! More specific triggers. Because of that I don't think we should add this at this point but wait for that plan to be finished, as it likely will include core and work slightly different.

I haven't seen many changes yet in that area so I assume that plan isn't finished as of now?

@bramkragten
Copy link
Member

I haven't seen many changes yet in that area so I assume that plan isn't finished as of now?

We are currently in the design process of the automation editor, it is a long process though, I'll discuss with product if we should hold this that long.

Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@github-actions github-actions bot added the stale label Oct 17, 2024
@karwosts
Copy link
Contributor Author

keep alive

@github-actions github-actions bot removed the stale label Oct 17, 2024
@bramkragten bramkragten added the Needs UX Pull requests requiring a review from the Home Assistant design team label Nov 6, 2024

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Change Required Requires a Backend Core Code Change 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.

4 participants