This card shows predictions for a MBTA prediction sensor.
The custom card code is located here. Copying the mbta-card.js
file into the <config directory>/www/mbta-card.js
directory (alongside the configuration.yml
file) for users using HASSIO.
Link mbta-card
inside you .
To enable this card, add the following lines to your ui-lovelace.yaml
file:
resources:
- type: module
url: /local/mbta-card.js
Set up the visualisations for the MBTA sensors. (the sensors must already be set up)
example ui-lovelace.yaml
card:
- entities:
- entity: sensor.mbta_jfk_umass
limit: 3
offset_minutes: 7
- entity: sensor.mbta_savin_hill
limit: 2
offset_minutes: 6
- entity: sensor.mbta_south_station
limit: 2
offset_minutes: 3
icon: /local/imgs/MBTA.png
theme: default
type: 'custom:mbta-card'
(string) (Required) the entity name of the sensor
(int) (Optional) the minimum minutes remaining before arrival (default: 0)
(int) (Optional) the maximum number of predictions to display (default: 10)
(path) (Required) location of the T logo
-
Add support for buses
-
Create custom compnent in HACS