home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
4.08k stars 2.8k forks source link

incorrect anchors not correctly displayed (since json helper?) #13017

Closed Mariusthvdb closed 2 years ago

Mariusthvdb commented 2 years ago

Checklist

Describe the issue you are experiencing

using anchors in dashboard files has always worked nicely, especially when making a mistake… it would simply state things like ‘missing anchor’ or ‘anchor not defined’ Not exactly sure.

And, it did show the card yaml in a placeholder in the Dashboard view.

With the new yaml checker however, this turns into a cryptic

Schermafbeelding 2022-06-27 om 14 13 07

which is simply not true, and an even odder error in the inspector, see below.

Schermafbeelding 2022-06-27 om 14 34 52

the test card I use hasn’t even got a logbook card configured.

Describe the behavior you expected

more concise error description and a placeholder with the card yaml in the dashboard (like before)

Steps to reproduce the issue

  1. use an incorrect yaml anchor in the dashboard view
  2. ...

What version of Home Assistant Core has the issue?

2022.7.0.dev20220627

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

any

Which operating system are you using to run this browser?

macOS 12.4

State of relevant entities

No response

Problem-relevant frontend configuration

simply do:


type: entities
title: Alarmclock settings
show_header_toggle: false
state_color: true
entities: *entities

without having declared a &entities anchor

Javascript errors shown in your browser console/inspector

Schermafbeelding 2022-06-27 om 15 01 50

Additional information

related to: https://github.com/home-assistant/core/pull/73874

bdraco commented 2 years ago
Screen Shot 2022-06-27 at 10 40 47 Screen Shot 2022-06-27 at 10 39 10

This is what I see on dev with two different systems

Mariusthvdb commented 2 years ago

detail: I am using yaml mode and dont use the UI editor

bdraco commented 2 years ago
Screen Shot 2022-06-27 at 14 27 04

Editing in the YAML editor also shows the error

bdraco commented 2 years ago
found undefined alias 'entities' in "/Users/bdraco/home-assistant/config/ui-lovelace.yaml", line 370, column 19

Here is what I get in yaml mode as well

Mariusthvdb commented 2 years ago

yes, thats what I saw before. Currently al I am seeing is what I posted above in Inspector and the Frontend . Even the home_assistant.log is quiet, both in Log viewer, and in the log itself. (they dont report the same...)

bdraco commented 2 years ago

Since I'm having trouble reproing, can you post exact replication steps/video?

Mariusthvdb commented 2 years ago

first: in my ui configured dashboard for testing purposes I indeed see:

Schermafbeelding 2022-06-28 om 07 12 31

as for the Yaml based dashboards:

Jun-28-2022 07-17-21

before you ask: Ive also tested it without the card_mod class:

type: entities
title: Alarmclock settings
show_header_toggle: false
#card_mod:
#  class: class-header-margin
state_color: true
entities: *anchor

but the results remains the same.

creating the false *anchor on a 2022.6.7 system:

Schermafbeelding 2022-06-28 om 10 58 29
Mariusthvdb commented 2 years ago

just as a related yaml issue, I yesterday was struggling to have several entities in a package go unavailable, without any reasonable clue...

turned out, they all were from a single package, wich also had an automation with yaml issue.

before, this did error out on that single automation, and didnt block the full package...Could this be a side effect of the new yaml interpreter?

github-actions[bot] commented 2 years ago

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.