hasl-sensor / lovelace-hasl-traffic-status-card

Lovelace Traffic Status Card for the HASL Platform
https://hasl.sorlov.com
Apache License 2.0
5 stars 1 forks source link

No traffic data shown and multiple table headers shown #3

Open matfouc opened 2 years ago

matfouc commented 2 years ago

Hi ! After an issue last month with over-exceeding requests, I'm finally able to retrieve traffic data through HASL. From sensors' perspective, everything looks good and I'm getting correct data for all traffic types. However when using the Lovelace card, I'm not getting anything. Here is a screenshot of the Lovelace configuration tool and what I'm getting: image

By looking at the JS code, I think that the issue with multiple headers is simply located in lines 188-190 and those 3 lines should be placed just before the loop starting in line 175.

About the empty traffic type statuses, I'm thinking also that's because of the sensor's data. I cannot see a "bus_status" (or similar) field on the root of each sensor but only per event. So status is undefined and therefore no HTML table row is rendered. There is though the sensor's state but it's not passed in the function rendering the HTML table. -> Could it the reason ? Do you see also the same issue on your side ?

micgus commented 2 years ago

I have the same issue, did you manage to work around it somehow @matfouc ?

Regards, Michael

matfouc commented 2 years ago

Hi @micgus , I'm not still a beginnger in JS but i could eventually look at it and i think i could fix it. But I haven't simply found time to do it so far.

dimmanramone commented 2 years ago

@matfouc @micgus I'm going to check it out as soon as I can. I guess you use HASL v.2 right?

micgus commented 2 years ago

@matfouc @micgus I'm going to check it out as soon as I can. I guess you use HASL v.2 right?

Champ! Thanks a mill. 👍 Yes indeed, 2.3.1 on my end.

matfouc commented 2 years ago

Hi @dimmanramone , yes i'm running HASL v2 too. If i remember well, the sensors change and i believe that's the reason why the card stopped to work. By the way, i've cloned the repo and i tried earlier today to do some modifications in the JS. But despite i copied the updated file to my HA folder and refreshed the cache to my browser, i couldn't see anything. Could you tell how to test properly ?

micgus commented 2 years ago

@matfouc @micgus I'm going to check it out as soon as I can. I guess you use HASL v.2 right?

Tjena! Just a friendly check-in to see if you had any time to look in to this? Cheers,

matfouc commented 2 years ago

Tjena ! I haven't since last time. @dimmanramone, have you had time ?