Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Lovelace card configuration gets scrambled/reordered #248

Closed
ghost opened this issue Mar 9, 2019 · 5 comments
Closed

Lovelace card configuration gets scrambled/reordered #248

ghost opened this issue Mar 9, 2019 · 5 comments

Comments

@ghost
Copy link

ghost commented Mar 9, 2019

move[bot] commented on Jan 28, 2019, 12:54 AM UTC:

rs443 commented on Jan 26, 2019, 8:03 AM UTC:

Home Assistant release with the issue:
0.86

Last working Home Assistant release (if known):
N/A

Operating environment (Hass.io/Docker/Windows/etc.):
Home Assistant on Windows 10, Python 3.6.8

Component/platform:
Lovelace UI

Description of problem:
I started using lovelace in the gui in the 0.86 release. I noticed a cosmetic "issue". When editing a card the lines in the configuration is scrambled. . The configuration is still valid but the lines has switched places. Possibly reordered alphabetically.

This makes is hard to edit a card in the editor, sometimes impossible.

This is an easy example of a card that was created and is readable and easy to understand:

type: horizontal-stack
cards:
  - type: sensor
    entity: sensor.inside_temperature
    detail: 1
    graph: line
    hours_to_show: 24
  - type: sensor
    entity: sensor.outside_temperature
    detail: 1
    graph: line
    hours_to_show: 24

When editing the same card this is the result:

cards:
  - detail: 1
    entity: sensor.inside_temperature
    graph: line
    hours_to_show: 24
    type: sensor
  - detail: 1
    entity: sensor.outside_temperature
    graph: line
    hours_to_show: 24
    type: sensor
type: horizontal-stack

Here is a more complex card that was once readable:

type: horizontal-stack
cards:
  - type: entity-filter
    entities:
      - device_tracker.iphone1
      - device_tracker.iphone2
    show_empty: false
    state_filter:
      - home
    card:
      type: glance
      show_name: false
      show_state: true
      title: Family
  - type: entity-filter
    entities:
      - device_tracker.iphone2
    show_empty: false
    state_filter:
      - not_home
    card:
      type: map
      entities:
        - entity: device_tracker.iphone2
      default_zoom: 12
  - type: entity-filter
    entities:
      - device_tracker.iphone2
    show_empty: false
    state_filter:
      - not_home
    card:
      type: map
      entities:
        - entity: device_tracker.iphone2
      default_zoom: 12

Now its a nightmare to edit:

cards:
  - card:
      show_name: false
      show_state: true
      title: Family
      type: glance
    entities:
      - device_tracker.iphone1
      - device_tracker.iphone2
    show_empty: false
    state_filter:
      - home
    type: entity-filter
  - card:
      default_zoom: 12
      entities:
        - entity: device_tracker.iphone1
      type: map
    entities:
      - device_tracker.iphone1
    show_empty: false
    state_filter:
      - not_home
    type: entity-filter
  - card:
      default_zoom: 12
      entities:
        - entity: device_tracker.iphone2
      type: map
    entities:
      - device_tracker.iphone2
    show_empty: false
    state_filter:
      - not_home
    type: entity-filter
type: horizontal-stack

It is possible to save the configuration without reordering the values?

This issue was moved by cgarwood from home-assistant/home-assistant#20450.

This issue was moved by iantrich from home-assistant/home-assistant-polymer#2601.

@ghost
Copy link
Author

ghost commented Mar 9, 2019

move[bot] commented on Jan 28, 2019, 12:54 AM UTC:

cgarwood commented on Jan 28, 2019, 12:54 AM UTC:

Moving this to the frontend repo so it can get more visibility

/move to home-assistant-polymer

@ghost
Copy link
Author

ghost commented Mar 9, 2019

@balloob commented on Jan 28, 2019, 1:08 AM UTC:

The cause is simple, we don't store the config in yaml format but in json.

The solution is not simple (I know of none)

@ghost
Copy link
Author

ghost commented Mar 9, 2019

@iantrich commented on Mar 9, 2019, 9:08 PM UTC:

Going to move this to ui-schema as this is not really a bug, but a preference

@corbosman
Copy link

I really hope something can be done about this. Once you start adding multiple stacks, it becomes absolutely horrendous to edit because of this problem.

@ghost
Copy link
Author

ghost commented Oct 4, 2019

This issue was moved by iantrich to home-assistant/home-assistant-polymer#3913.

@ghost ghost closed this as completed Oct 4, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant