swiss-army-knife-card icon indicating copy to clipboard operation
swiss-army-knife-card copied to clipboard

"Cannot read properties of undefined (reading 'state')"

Open PeterGrace opened this issue 2 years ago • 1 comments

Bug report notice

  • [ ] Yes, I'm sure that it is not a configuration mistake (Maybe? How do I know what I don't know?)

Bug description

As mentioned in #161, after fixing the templates issue I am now stuck with the below error message, "Cannot read properties of undefined (reading 'state').

The same behavior is shown in the Android home assistant application.

To Reproduce

Steps to reproduce the behavior:

  1. Attempt to load any VSAK view, regardless of template or not.
  2. See error

Expected behavior

Proper rendering of information from sensor states in the visualization

Screenshots

image

Desktop browser (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version: 106.0.5249.91

Companion App on Smartphone/Tablet (please complete the following information):

  • Device: Samsung Galaxy S21 Ultra
  • OS: Android

PeterGrace avatar Oct 08 '22 00:10 PeterGrace

Thank you for creating your first issue for the Swiss Army Knife custom card!

github-actions[bot] avatar Oct 08 '22 00:10 github-actions[bot]

@PeterGrace - I had the same issue. Reason was that the entity did not exist.

Symbiot78 avatar Jan 29 '23 08:01 Symbiot78

I can confirm that this error occurs if one or more sensors in your config don't exist. In my case, I had a linkquality sensor configured which was disabled and as a result it caused the whole template to fail rendering. Thanks @Symbiot78 !!!

PeterGrace avatar Feb 01 '23 13:02 PeterGrace