hasl-sensor / lovelace-hasl-departure-card

Lovelace Departure Card for the HASL Platform
https://hasl.sorlov.com
Apache License 2.0
15 stars 14 forks source link

Cannot read properties of undefined (reading 'config') #24

Closed morlic closed 1 year ago

morlic commented 1 year ago

Hi, I have the error in the frontend with the hasl-departure-card, seems that the config is undefined. The card configuration is:

type: custom:hasl-departure-card
header: true
departures: true
deviations: true
timeleft: true
updated: true
name: Departures
adjust_times: false
hide_departed: false
language: en-EN
entities:
  - sensor.sl_departure_sensor

The error occurs at line https://github.com/hasl-sensor/lovelace-hasl-departure-card/blob/master/dist/hasl-departure-card.js#L229, this is undefined. If I change this.config to config it works fine, but it still seems like and odd bug, I would expect to reach this from the parent closure. Perhaps a right solution would be to bind getEntitiesContent on line 240?

morlic commented 1 year ago

closing, duplicate of #19