Skip to content
This sensor uses unofficial API to get data from https://www.rozkladzik.pl and provide information about departures for chosen stop.
Python
Branch: master
Clone or download
Latest commit 4767d61 Oct 31, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
custom_components/rozkladzik Added stops group mode, added reading direction info Oct 30, 2019
LICENSE Added license Oct 9, 2019
README.md Updated README Oct 31, 2019
hacs.json Updated documentation Aug 29, 2019
info.md Added stops group mode, added reading direction info Oct 30, 2019

README.md

Rozkładzik sensor

hacs_badge buymeacoffee_badge

This sensor uses unofficial API to get data from Rozkładzik.pl and provide information about departures for chosen stop.

Configuration options

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

Configuration for stop

Key Description
id ID of stop
name Name of stop
stops_group_mode Enables stops group mode. Possible values: true, false.

Example usage

sensor:
  - platform: rozkladzik
    city: 'wroclaw'
    stops:
      - id: 1281
        name: 'Plac Grunwaldzki'
      - id: 94
        name: 'Rynek'
        stops_group_mode: true

Installation

Download sensor.py and manifest.json 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/raw/master/custom_components/rozkladzik/sensor.py
wget https://github.com/PiotrMachowski/Home-Assistant-custom-components-Rozkladzik/raw/master/custom_components/rozkladzik/manifest.json

Hints

  • This sensor provides html attribute which can be used in HTML card or HTML Template card:
    • HTML Card:
      - type: custom:html-card
        title: 'Rozkładzik'
        content: |
          <big><center>Departures</center></big>
          [[ sensor.rozkladzik_wroclaw_1709.attributes.html ]]
    • 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') }}
    • This integration is available in HACS.

FAQ

  • 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_mode is determined by value of query parameter c. If it is equal to bsa you have to enable group mode.
    • Value for city comes from <name_of_city> path fragment.
    • Value for id comes from query parameter t or b for group mode.

Buy Me A Coffee

You can’t perform that action at this time.