frontend
frontend copied to clipboard
Scripting: Comments put in YAML get removed once editing in visual editor
Checklist
- [X] I have updated to the latest available Home Assistant version.
- [X] I have cleared the cache of my browser.
- [X] I have tried a different browser to see if it is related to my browser.
Describe the issue you are experiencing
When making a script and switching to YAML, you can add comments by using # in the beginning of a line.
When going back to visual editor, and later switching to YAML again, the comments are gone.
Describe the behavior you expected
When going back to YAML after visual editor, comments should still be there.
Steps to reproduce the issue
- Create new script (for example: to turn on light)
- Open in YAML
- Add comment using
# - Go back to visual editor
- Save script
- Open script again
- Open in YAML => No comments anymore
What version of Home Assistant Core has the issue?
2022.7.4
What was the last working version of Home Assistant Core?
No response
In which browser are you experiencing the issue with?
Microsoft Edge 103.0.1264.62
Which operating system are you using to run this browser?
Windows 11
State of relevant entities
Script
Problem-relevant frontend configuration
alias: Example
sequence:
## This comment will disappear once we reopen in YAML later
- type: turn_off
device_id: 123
entity_id: light.light1
domain: light
mode: single
Javascript errors shown in your browser console/inspector
No response
Additional information
No response
this is true and also valid for automation's, this is a problem from the earlier versions of ha that nobody bother to report or fix, I overcome this by making different files for script/automation one for the ones I'll edit via the UI (empty anyway but the possibility exists) and one for the yaml ones (via directory)
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.