Skip to content

Lovelace card configuration gets scrambled/reordered #3913

@ghost

Description

move[bot] commented on Mar 9, 2019, 9:08 PM UTC:

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.

This issue was moved by iantrich from home-assistant/ui-schema#248.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions