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

Standard setup throwing "this is undefined" #29

Closed Rydberg95 closed 1 year ago

Rydberg95 commented 1 year ago

Adding the card as instructed renders "this is undefined" in the card header. It seems to be picking up the JS file, but that the JS during runtime is throwing the error.

I tried both adding it via HACS and manually. HASL as data feed seems to getting the data correctly, since I can see departure times when viewing the entity in HA.

File location for the JS script (when adding via HACS) is .../www/community/lovelace-hasl-departure-card/hasl-departure-card.js

HA-version: 2023.2.2 HACS-version: 1.30.1 (20220906112053)

Browser used: Firefox v108.

When running in Chromium, the error displayed is instead "Cannot read properties of undefined (reading 'config')", but my guess is that the origin is the same..?

Card config us exactly as mentioned in docs, which the only change being the entity line: sensor.sl_departure_sensor_2193_hasl_sl_departures

morlic commented 1 year ago

could it be related to #19 and #24?

matfouc commented 1 year ago

I ran personally into this issue his week-end and i figured out that i need to specifically choose "master" branch when installing this custom card. By default HACS suggests automatically to install version 2.6.0 which doesn't include latest fixes like in #19 or #24 .

@DSorlov, perhaps you could release a new version when you have time

Rydberg95 commented 1 year ago

could it be related to #19 and #24?

Looks like it is. However, shouldn't the issue appear for everyone since I haven't changed anything? I'm not sure what parts I should change to make it work.

Rydberg95 commented 1 year ago

By default H

That worked fine. Thanks!