Skip to content
This repository has been archived by the owner on Sep 11, 2021. It is now read-only.
/ mbta-card Public archive
forked from dhanani94/mbta-card

Custom card for the MBTA predictions component.

License

Notifications You must be signed in to change notification settings

MikeFez/mbta-card

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mbta-card

This card shows predictions for a MBTA prediction sensor.

example

Installation

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.

Configuration

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'

Configuration Variables

entity

(string) (Required) the entity name of the sensor

offset_minutes

(int) (Optional) the minimum minutes remaining before arrival (default: 0)

limit

(int) (Optional) the maximum number of predictions to display (default: 10)

icon

(path) (Required) location of the T logo

Future Plans

inspirations