{"id":25193799,"url":"https://github.com/chevrontango/nationalrail-status-card","last_synced_at":"2025-10-04T14:15:40.719Z","repository":{"id":276625021,"uuid":"929805127","full_name":"ChevronTango/nationalrail-status-card","owner":"ChevronTango","description":"A card for displaying the status of National Rail trains in the style of the matrix screens on station platforms","archived":false,"fork":false,"pushed_at":"2025-05-23T16:33:55.000Z","size":423,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-07T07:33:40.153Z","etag":null,"topics":["automation","card","custom","hassio","home-assistant","lovelace-custom-card","sensor"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChevronTango.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-09T12:56:47.000Z","updated_at":"2025-09-02T12:24:37.000Z","dependencies_parsed_at":"2025-02-09T14:19:40.172Z","dependency_job_id":"c1f69937-2ca3-4067-9ade-60cfdbede8c3","html_url":"https://github.com/ChevronTango/nationalrail-status-card","commit_stats":null,"previous_names":["chevrontango/nationalrail-status-card"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ChevronTango/nationalrail-status-card","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChevronTango%2Fnationalrail-status-card","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChevronTango%2Fnationalrail-status-card/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChevronTango%2Fnationalrail-status-card/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChevronTango%2Fnationalrail-status-card/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChevronTango","download_url":"https://codeload.github.com/ChevronTango/nationalrail-status-card/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChevronTango%2Fnationalrail-status-card/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278322148,"owners_count":25967874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","card","custom","hassio","home-assistant","lovelace-custom-card","sensor"],"created_at":"2025-02-09T23:22:33.771Z","updated_at":"2025-10-04T14:15:40.702Z","avatar_url":"https://github.com/ChevronTango.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lovelace Nationalrail Status Card\nA status card for [Home Assistant](https://github.com/home-assistant/home-assistant) Lovelace UI for showing the current status of trains running from a station.\n\nThe card works with entities from within the **sensor**  domain and is intended to be used with entities from the [National Rail API Integration](https://github.com/jfparis/homeassistant_nationalrail).\n\n![Preview](images/sample.png)\n\n## Install\n\n### HACS (recommended) \n\nThis card is not yet available in [HACS](https://hacs.xyz/) (Home Assistant Community Store) directly but can still be added manually.\n\u003csmall\u003e*HACS is a third party community store and is not included in Home Assistant out of the box.*\u003c/small\u003e\n\n1. Open HACS and navigate to Custom Repositories.\n\n2. Select `Dashboard` as the Type and enter `https://github.com/ChevronTango/nationalrail-status-card` as the repository. Save and refresh.\n\n3. Find `Nationalrail Status Card` in the HACS store and select install.\n\n### Manual install\n\n1. Download and copy `nationalrail-status-card.js` from the [latest release](https://github.com/ChevronTango/nationalrail-status-card/releases/latest) into your `config/www` directory.\n\n2. Add the resource reference as decribed below.\n\n\n### CLI install\n\n1. Move into your `config/www` directory.\n\n2. Grab `nationalrail-status-card.js`:\n\n  ```\n  $ wget https://github.com/ChevronTango/ha-nationalrail-status-card/releases/download/v0.0.1/nationalrail-status-card.js\n  ```\n\n3. Add the resource reference as decribed below.\n\n### Add resource reference\n\nIf you configure Lovelace via YAML, add a reference to `nationalrail-status-card.js` inside your `configuration.yaml`:\n\n  ```yaml\n  resources:\n    - url: /local/nationalrail-status-card.js?v=0.0.1\n      type: module\n  ```\n\nElse, if you prefer the graphical editor, use the menu to add the resource:\n\n1. Make sure, advanced mode is enabled in your user profile (click on your user name to get there)\n2. Navigate to Configuration -\u003e Lovelace Dashboards -\u003e Resources Tab. Hit orange (+) icon\n3. Enter URL `/local/nationalrail-status-card.js` and select type \"JavaScript Module\".\n(Use `/hacsfiles/nationalrail-status-card/nationalrail-status-card.js` and select \"JavaScript Module\" for HACS install)\n4. Restart Home Assistant.\n\n## Using the card\n\n1. Install the [National Rail API Integration](https://github.com/jfparis/homeassistant_nationalrail).\n\n2. Add a new device from the National Rail API Integration with a source and destination station. Only trains with a direct connection from the source to the destination will appear. Trains that require an interchange will not display.\n\n3. In your dashboard add a New Card and select the `National Rail Status Card`.\n\n4. Select the entity for your station and destination, and optionally choose the number of trains to display. Click Save.\n\n### Options\n\n#### Card options\n| Name | Type | Default | Since | Description |\n|------|:----:|:-------:|:-----:|-------------|\n| type ***(required)*** | string |  | v0.0.1 | `custom:nationalrail-status-card`.\n| entity ***(required)*** | string |  | v0.0.1 | The entity being monitored\n| limit ***(optional)*** | number |  | v0.0.1 | The maximum number of trains to show at once. If absent then defaults to the API default.\n\n## Development\n\n1. Clone this repository into your `config/www` folder using git:\n\n```\n$ git clone https://github.com/ChevronTango/ha-nationalrail-status-card.git\n```\n\n2. Add a reference to the card in your `ui-lovelace.yaml`:\n\n```yaml\nresources:\n  - url: /local/nationalrail-status-card/dist/nationalrail-status-card.js\n    type: module\n```\n\n### Instructions\n\n*Requires `nodejs` \u0026 `npm`.*\n\n1. Move into the `nationalrail-status-card` repo, checkout the *dev* branch \u0026 install dependencies:\n```console\n$ cd nationalrail-status-card \u0026\u0026 git checkout dev \u0026\u0026 npm install\n```\n\n2. Make changes to the source code.\n\n3. Build the source by running:\n```console\n$ npm run build\n```\n\n4. Refresh the browser to see changes.\n\n    *Make sure cache is cleared or disabled.*\n\n5. *(Optional)* Watch the source and automatically rebuild on save:\n```console\n$ npm run watch\n```\n\n*The new `nationalrail-status-card.js` will be build and ready inside `/dist`.*\n\nNote that the `dev` branch is the most up-to-date and matches our beta releases.\n\nPlease refer to the [Contribution Guidelines](./CONTRIBUTING.md) if you're interested in contributing to the project. (And thanks for considering!)\n\n## Getting errors?\nMake sure you have `javascript_version: latest` in your `configuration.yaml` under `frontend:`.\n\nMake sure you have the latest versions of `nationalrail-status-card.js` \u0026 `nationalrail-status-lib.js`.\n\nIf you have issues after updating the card, try clearing your browser cache.\n\nIf you have issues displaying the card in older browsers, try changing `type: module` to `type: js` at the card reference in `ui-lovelace.yaml`.\n\n## License\nThis project is under the MIT license.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchevrontango%2Fnationalrail-status-card","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchevrontango%2Fnationalrail-status-card","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchevrontango%2Fnationalrail-status-card/lists"}