This sensor uses unofficial API to get data from Rozkładzik.pl and provide information about departures for chosen stop.
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
name |
string |
False |
Rozkładzik |
Name of sensor |
city |
string |
True |
- | Name of city used in API |
stops |
list |
True |
- | List of stops to monitor |
| Key | Description |
|---|---|
id |
ID of stop |
name |
Name of stop |
stops_group_mode |
Enables stops group mode. Possible values: true, false. |
lines |
list |
directions |
list |
sensor:
- platform: rozkladzik
city: 'wroclaw'
stops:
- id: 1281
name: 'Plac Grunwaldzki'
directions:
- "Reja"
- id: 94
name: 'Rynek'
stops_group_mode: true
lines:
- "33"
Using HACS (recommended)
This integration can be installed using HACS.
To do it search for Rozkładzik in Integrations section.
To install this integration manually you have to download rozkladzik.zip and extract its contents to config/custom_components/rozkladzik directory:
mkdir -p custom_components/rozkladzik
cd custom_components/rozkladzik
wget https://github.com/PiotrMachowski/Home-Assistant-custom-components-Rozkladzik/releases/latest/download/rozkladzik.zip
unzip rozkladzik.zip
rm rozkladzik.zip- This sensor provides attributes which can be used in HTML card or HTML Template card:
html_timetable,html_departures- HTML Card:
- type: custom:html-card title: 'Rozkładzik' content: | <big><center>Departures</center></big> [[ sensor.rozkladzik_wroclaw_1709.attributes.html_departures ]] <big><center>Timetable</center></big> [[ sensor.rozkladzik_wroclaw_1709.attributes.html_timetable ]]
- HTML Template Card:
- type: custom:html-template-card title: 'Rozkładzik' ignore_line_breaks: true content: | <big><center>Departures</center></big> {{ state_attr('sensor.rozkladzik_wroclaw_1709','html_departures') }} <big><center>Timetable</center></big> {{ state_attr('sensor.rozkladzik_wroclaw_1709','html_timetable') }}
- This integration is available in HACS.
- HTML Card:
-
How to get values for configuration parameters?
To find out values for configuration parameters follow the following steps:
- Go to rozkladzik.pl and find desired stop.
- Activate developer tools using
[F12]button. - Click on chosen stop and in network tab look for call to
https://www.rozkladzik.pl/<name_of_city>/timetable.txt?...URL - Value for
stops_group_modeis determined by value of query parameterc. If it is equal tobsayou have to enable group mode. - Value for
citycomes from<name_of_city>path fragment. - Value for
idcomes from query parametertorbfor group mode.
If you want to support my work with a donation you can use one of the following platforms:
| Platform | Payment methods | Link | Comment |
|---|---|---|---|
| Ko-fi |
|
|
|
| buycoffee.to |
|
|
|
| PayPal |
|
|
|
| Revolut |
|
|
|
