You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add more bus lines
* Update documentation regarding delays
* Default delay value is taken from sensor config
* Add sort and municipality options
* Add css classes for lines by municipality
* Reflect new changes in card
* Update vasttrafik-card.js
* Remove line styles from generic css file
* Generate css helper
* Add helper section
* +u
* Showcase line colours
* New colours
* Delete x.png
* Add files via upload
* Sort lines
* Delete genereate_html_with_colours.py
* Delete new_colours.png
* Add files via upload
* Add files via upload
* Add files via upload
* Use new colours in example
Styled entities using the Västtrafik theme in a lovelace entities card. All trams and buses are styled using the colours used in Göteborg, so if you are living in Västra Götaland but outside of Göteborg you have to change the css manually. This card also displays:
4
+
Styled entities using the Västtrafik theme in a lovelace entities card. All trams and buses are styled using the colours used in their respective municipality.
5
+
6
+
This card also displays:
5
7
* When the next vehicle is leaving
6
8
* Departing station (which requires [this version](https://github.com/Miicroo/ha-vasttrafik) of the Västtrafik sensor)
7
-
* When you have to leave home in order to catch the vehicle (or the amount of minutes until the vehicle leaves if no delay is set).
9
+
* When you have to leave home in order to catch the vehicle (also known as the sensor delay).
10
+
* Sorting of entities, showing the next entity to depart first
8
11
9
12
> 
10
13
>
11
14
> If you are looking for the Västtrafik-card where you can *group* sensors based on departure or destination, you want the (discontinued) [v1.0.0](https://github.com/Miicroo/lovelace-vasttrafik-card/releases/tag/v1.0.0)
12
15
13
16
## Options
14
-
| Name | Type | Default | Description
15
-
| ---- | ---- | ------- | -----------
16
-
| entities | list | **Required** | See [entity format](https://github.com/Miicroo/lovelace-vasttrafik-card#entity-format)
17
-
| title | string | Västtrafik | The title of the card
17
+
| Name | Type | Default | Description
18
+
| ---- | ---- | ------- | -----------
19
+
| entities | list | **Required** | A list of entity sensors provided by the Västtrafik integration
20
+
| title | string | Västtrafik | The title of the card
21
+
| municipality | string | Göteborg | The municipality of the station(s), [more info here](https://github.com/Miicroo/lovelace-vasttrafik-card#municipality)
22
+
| sort | boolean | true | Whether to sort the departures (earliest first), or keep the entities in the given order
18
23
19
-
## Entity format
20
-
Entities can be defined in 3 different ways:
24
+
## Municipality
25
+
As there are many lines with the same name or number in Västra Götaland, the styles are split by municipality. For accuracy, choose the municipality of your departing sensor(s).
21
26
22
-
1) As a simple string containing the id
23
-
```yaml
24
-
- sensor.ekedal_till_brunnsparken
25
-
- sensor.godhemsgatan_till_brunnsparken
27
+
Currently supported municipalities:
26
28
```
27
-
2) As an object containing the id and the delay in minutes (e.g. how long it would take you to walk to the departing station)
28
-
```yaml
29
-
- id: sensor.ekedal_till_brunnsparken
30
-
delay: 3
31
-
- sensor.godhemsgatan_till_brunnsparken
32
-
delay: 2
29
+
Ale
30
+
Alingsås
31
+
Åmål
32
+
Årjäng
33
+
Bengtsfors
34
+
Bollebygd
35
+
Borås
36
+
Dals-Ed
37
+
Essunga
38
+
Falkenberg
39
+
Falköping
40
+
Färgelanda
41
+
Göteborg
42
+
Götene
43
+
Grästorp
44
+
Gullspång
45
+
Habo
46
+
Hallsberg
47
+
Härryda
48
+
Herrljunga
49
+
Hjo
50
+
Jönköping
51
+
Karlsborg
52
+
Kristinehamn
53
+
Kumla
54
+
Kungälv
55
+
Kungsbacka
56
+
Laxå
57
+
Lerum
58
+
Lidköping
59
+
Lilla Edet
60
+
Lysekil
61
+
Mariestad
62
+
Mark
63
+
Mellerud
64
+
Mölndal
65
+
Mullsjö
66
+
Munkedal
67
+
Nässjö
68
+
Norge
69
+
Öckerö
70
+
Örebro
71
+
Orust
72
+
Partille
73
+
Säffle
74
+
Skara
75
+
Skövde
76
+
Sotenäs
77
+
Stenungsund
78
+
Strömstad
79
+
Svenljunga
80
+
Tanum
81
+
Tibro
82
+
Tidaholm
83
+
Tjörn
84
+
Töreboda
85
+
Tranemo
86
+
Trollhättan
87
+
Uddevalla
88
+
Ulricehamn
89
+
Vänersborg
90
+
Vara
91
+
Varberg
92
+
Vårgårda
93
+
Västra Götaland
33
94
```
34
-
3) As a combination of 1) and 2), the entities without specified delay will get delay = 0.

110
+
## Tram and bus styles (example shows Göteborg)
111
+

51
112
52
113
## In case of errors
53
114
1. A warning will be printed to the console if any entity id you provide is not attributed to Västtrafik
54
115
2. The default sensor does not expose from/to, use [this one](https://github.com/Miicroo/ha-vasttrafik) instead
55
116
3. The sensor updates every 2 minutes, so you will sometimes get `-2 minutes` until departure
117
+
118
+
119
+
## Västtrafik updated their designs?
120
+
To get the latest designs/colours exported as css, run `python3 ../helpers/generate_css.py` from the `dist` folder.
0 commit comments