Home Assistant Southeastern Rail Card by @crismc
A custom Home Assistant card for the Lovelace theme to show next available trains to specific stops through the National Rail Darwin API. To be used with the Home Assistant custom component ha_southeasternrail (https://github.com/crismc/ha_southeasternrail)
Based on the community driven boilerplate of best practices for Home Assistant Lovelace custom cards (Boilerplate Card by @iantrich https://github.com/custom-cards/boilerplate-card)
Name | Type | Requirement | Description | Default |
---|---|---|---|---|
type | string | Required | custom:southeastern-rail-card |
|
name | string | Optional | Card name based on entity | none |
show_error | boolean | Optional | Show error message such as no service data | true |
show_warning | boolean | Optional | Show station alert messages | true |
show_via_destination | boolean | Optional | Show if train goes via an alternate route | true |
show_callingpoints | boolean | Optional | Show train service calling stops | true |
show_status | boolean | Optional | Show service status (e.g. On Time, Delayed etc) | true |
show_arrival_time | boolean | Optional | Show train service arrival time at destination | true |
show_departure_time | boolean | Optional | Show train service departure time from primary station | true |
entity | string | Optional | Home Assistant entity ID. | none |
Clone the repository to your machine
Install necessary modules (verified to work in node 8.x)
yarn install
or npm install
Do a test lint & build on the project. You can see available scripts in the package.json
npm run build
Copy content of <project_dir>/dist to your Home Assistant instance /www/ha_southeastern-rail-card If directories do not exist, create them.
Go to Settings > Dashboards, click the three dots menu in the top right and select Resources. If you do not have the three dots, you will need to temporarily enable "Advanced Mode" within Profile
Choose "Add Resource" and enter the following: URL: /local/ha_southeastern-rail-card/southeastern-rail-card.js Resource Type: JavaScript Module
If you created the /www directory, restart Home Assistant (Developer Tools > Restart)