Closed kellerassel007 closed 11 months ago
Same here, please leave a reply and tell us 🙏
I came for the same reason. Just integrated the JS into ressources but the sample code is not working as the card type is not recognized. Thanks for any info on how to intall properly :)
Hi @kellerassel007 , @Blueheadings , @Dale81 for me its working - here my few steps
/config/www/community/public-transport/connection.card.js
http://[my HA URL]/config/lovelace/resources
/hacsfiles/public-transport/connection.card.js
as JavaScript-ModuleI guess this made the trick - I am using HACS for other integrations and they are stored there as well using the same folder alias "/hacsfiles" instead of "/config/www/community". Using "/local/" or "/config/www/community" was not working for me.
type: "custom:public-transport-connection-card"
title: Nächste Bahn
entity: sensor.[name of my Deutsche Bahn sensor]
departure_station: [departure name]
arrival_station: [arrival name]
attributes:
description: products
departure_time: departure
departure_delay: delay
arrival_time: arrival
arrival_delay: delay_arrival
next_departure_time: next
next_arrival_time: next_on
everything in [brackets] need to been adjusted to your needs...
Thats it
Hi @kellerassel007 , @Blueheadings , @Dale81 for me its working - here my few steps
1. place the script in this location: `/config/www/community/public-transport/connection.card.js` 2. open the page in Browser (if you don´t see the "resources" in the menu) `http://[my HA URL]/config/lovelace/resources` 3. Add Resource with URL: `/hacsfiles/public-transport/connection.card.js` as JavaScript-Module
I guess this made the trick - I am using HACS for other integrations and they are stored there as well using the same folder alias "/hacsfiles" instead of "/config/www/community". Using "/local/" or "/config/www/community" was not working for me.
4. restart HA 5. create a manual card with this code:
type: "custom:public-transport-connection-card" title: Nächste Bahn entity: sensor.[name of my Deutsche Bahn sensor] departure_station: [departure name] arrival_station: [arrival name] attributes: description: products departure_time: departure departure_delay: delay arrival_time: arrival arrival_delay: delay_arrival next_departure_time: next next_arrival_time: next_on
everything in [brackets] need to been adjusted to your needs...
Thats it
Awesome, that worked for me, thanks a lot!
I can't figure out how to install this custom component card?