aex351 / home-assistant-neerslag-app

Neerslag app for Home Assistant. All-in-one package (Sensors + Card).
59 stars 15 forks source link

Card doesn't show, TypeError: Cannot read properties of undefined (reading 'length') #44

Open bvhme opened 1 year ago

bvhme commented 1 year ago

On pages where I put a card, without showing it anything, I get

TypeError: Cannot read properties of undefined (reading 'length')

image

The code at that address is:

if( chartData.length > 0 ) 

This is my config and those sensors are the right ones:

type: custom:neerslag-card
title: Neerslag
entities:
  - sensor.buiten_buienalarm_regen_data
  - sensor.buiten_buienradar_regen_data
aex351 commented 3 months ago

Error management of the card could be improved to cache such errors. However, it is slightly an edge case as we can expect any of the used sensors to contain data.