Present departure times from HASL 4 Departure sensors
Copy hasl4-departure-card.js
to <config>/www/hasl4-departure-card.js
Where <config>
is your Home Assistant configuration directory.
Then use the following in your ui-lovelace.yaml
file:
resources:
- url: /local/hasl4-departure-card.js
type: js
In your lovelace dashboard, Edit Dashboard -> Add Card -> Search for 'HASL Departure Card'
Card fully supports configuration through the UI
Name | Type | Required? | Description |
---|---|---|---|
entities | array | required | List of entities to show. 'Departure' sensor is advised. |
show_name | bool | optional | Render card name. |
name | string | optional | If set, this will be rendered as the card name. |
show_entity_name | bool | optional | Render an individual name for each entity section. |
show_header | bool | optional | Render headers in each section such as "Line", "Destination" and "Departure". |
show_icon | bool | optional | Render transport icon for each line. |
show_departures | bool | optional | Render departures section. |
max_departures | number | optional | Max departures to show, default to all. |
direction | number | optional | Render departures only in said direction |
hide_departed | bool | optional | If set, will hide already departured vehicles. |
show_departed_offset | bool | optional | If set, will show some departed vehicles, which departed less than the offset minutes ago. |
adjust_departure_time | bool | optional | Adjust departure time taking last update into account. |
show_time_always | bool | optional | Always present time in HH:MM form. If not set, time will be presented as "in X minutes" or "X minutes ago". |
show_updated | bool | optional | Render the 'last updated' text |
language | string | optional | The texts will be rendered in this language. Can be one of sv-SE , en-EN , fr-FR . |
click_action | string or object | optional | Action when tapping the card. See section click_action below. |
The click_action
option can be used to specify what happens when the card is tapped. It can be one of the following:
-
Display information about the entity that was clicked:
click_action: info
-
Display information about the specific entity
click_action: entityId: sun.sun
-
Call a service:
click_action: domain: light service: turn_on data: entity_id: light.living_room
- Huge thanks to @dimmanramone for pimping the card!
- @DSorlov for his work on the original card