sijo.91
(Simon)
December 3, 2024, 6:56pm
1
I have numerous times been in the automation editor and then accidentally pressed a button on the sidebar, which instantly navigates me away. It should ask me if I want to save the automation changes first, or even save the automation as a draft.
Pssst Doesn’t currently ask if you want to save, but that will come in a follow-up
home-assistant:dev
← jpbede:automation-editor-prevent-navigate
opened 06:55PM - 05 Dec 24 UTC
## Proposed change
Prevent (accidentally) exiting the automation/script/scene e… ditor by navigating in the sidebar if you have unsaved changes. You will now be asked if you are sure you want to leave the editor.
WTH: https://community.home-assistant.io/t/wth-doesnt-ha-ask-if-i-want-to-save-automations/804030
https://github.com/user-attachments/assets/3f32e442-2912-42cd-9ffc-314acdbf0bc4
## Type of change
<!--
What type of change does your PR introduce to the Home Assistant frontend?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] 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
<!--
Supplying a configuration snippet, makes it easier for a maintainer to test
your PR.
-->
```yaml
```
## Additional information
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: fixes #
- This PR is related to issue or discussion:
- Link to documentation pull request:
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [x] The code change is tested and works locally.
- [x] 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:
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
<!--
Thank you for contributing <3
-->
[docs-repository]: https://github.com/home-assistant/home-assistant.io
5 Likes