frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Editing Statistics Graph Card Configuration via code editor automatically removes code

Open emwolf1 opened this issue 3 years ago • 2 comments

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. codeedit1 codeedit1 codeedit2 codeedit3

Describe the behavior you expected

Allow editing and not modify code unless requested by user.

Steps to reproduce the issue

  1. enter Statistics Graph Card Configuration
  2. select show code editor
  3. create new line under first entity under -entities:
  4. start typing - enter multiple spaces to reach indentation
  5. type any alphanumeric key
  6. 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

emwolf1 avatar Sep 13 '22 23:09 emwolf1

Confirm the issue. Also, sometimes while typing a cursors suddenly jumps to the code's beginning.

ildar170975 avatar Sep 14 '22 14:09 ildar170975

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.

github-actions[bot] avatar Dec 13 '22 15:12 github-actions[bot]