Skip to content

Lovelace card for listing departures from Rejseplanen sensors

License

Notifications You must be signed in to change notification settings

DarkFox/rejseplanen-card

Repository files navigation

rejseplanen-card

Lovelace card for listing departures from Rejseplanen sensors

This works with the Rejseplanen sensor included in Home Assistant.

I've tried to add as many styles for different transit types and routes as I could find, but please let me know if any are missing.

Example

Installation

HACS

Step 1

Search for Rejseplanen Card in the "Frontend" tab, then click install.

Step 2

Link rejseplanen-card inside your configuration:

resources:
  url: /hacsfiles/rejseplanen-card/rejseplanen-card.js
  type: js

Manual installation

Step 1

Install rejseplanen-card by copying rejseplanen-card.js from this repo to <config directory>/www/rejseplanen-card.js of your Home Assistant instance.

Example:

wget https://github.com/DarkFox/rejseplanen-card/raw/master/rejseplanen-card.js
mv rejseplanen-card.js ~/.homeassistant/www/

Step 2

Link rejseplanen-card inside your configuration.

resources:
  url: /local/rejseplanen-card.js?v=0
  type: js

Configuration

Add a custom element in your ui-lovelace.yaml

Name Type Default Supported options Description
type string Required custom:rejseplanen-card Type of the card
entity string Required sensor.rejseplanen entity_id
show_scheduled_time boolean false true false
max_entries number optional any number Limit number of departures shown

Example:

      - type: custom:rejseplanen-card
        entity: sensor.rejseplanen
        show_scheduled_time: true # Optional
        max_entries: 5 # Optional

Credits

Based on cgtobi and DavidMStraub's work: https://github.com/cgtobi/rmv-card