mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
no ordered dict (#18982)
This commit is contained in:
parent
4486de743d
commit
b5e7e45f6c
@ -271,7 +271,6 @@ def add_card(fname: str, view_id: str, card_config: str,
|
|||||||
card_config = yaml.yaml_to_object(card_config)
|
card_config = yaml.yaml_to_object(card_config)
|
||||||
if 'id' not in card_config:
|
if 'id' not in card_config:
|
||||||
card_config['id'] = uuid.uuid4().hex
|
card_config['id'] = uuid.uuid4().hex
|
||||||
card_config.move_to_end('id', last=False)
|
|
||||||
if position is None:
|
if position is None:
|
||||||
cards.append(card_config)
|
cards.append(card_config)
|
||||||
else:
|
else:
|
||||||
@ -396,7 +395,6 @@ def add_view(fname: str, view_config: str,
|
|||||||
view_config = yaml.yaml_to_object(view_config)
|
view_config = yaml.yaml_to_object(view_config)
|
||||||
if 'id' not in view_config:
|
if 'id' not in view_config:
|
||||||
view_config['id'] = uuid.uuid4().hex
|
view_config['id'] = uuid.uuid4().hex
|
||||||
view_config.move_to_end('id', last=False)
|
|
||||||
if position is None:
|
if position is None:
|
||||||
views.append(view_config)
|
views.append(view_config)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user