frontend
frontend copied to clipboard
Editing Statistics Graph Card Configuration via code editor automatically removes code
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
Attempting to edit via the code editor but the code gets checked on keystroke and modified immediately. Entering any character under the entities indentation removes the entire entity. Mistyping anywhere generates notifications such as
"Visual editor is not supported for this configuration:
Key 'amchart_type' is not expected or not supported by the visual editor.
You can still edit your config in YAML."
This is within the code editor, not via the visual editor.

Describe the behavior you expected
Allow editing and not modify code unless requested by user.
Steps to reproduce the issue
- enter Statistics Graph Card Configuration
- select show code editor
- create new line under first entity under -entities:
- start typing - enter multiple spaces to reach indentation
- type any alphanumeric key
- the previous entity will be removed and cursor will move to the top left ...
What version of Home Assistant Core has the issue?
Home Assistant 2022.9.2
What was the last working version of Home Assistant Core?
No response
In which browser are you experiencing the issue with?
google chrome Version 105.0.5195.102 (Official Build) (64-bit)
Which operating system are you using to run this browser?
Windows 10 Home 21H2
State of relevant entities
No response
Problem-relevant frontend configuration
chart_type: line
period: hour
days_to_show: 30
type: statistics-graph
entities:
- sensor.power_usage_801054
- sensor.power_usage_687593
stat_types:
- mean
title: Power usage
Javascript errors shown in your browser console/inspector
No response
Additional information
No response
Confirm the issue. Also, sometimes while typing a cursors suddenly jumps to the code's beginning.
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.