Skip to content

This sensor uses unofficial API to get data from https://www.rozkladzik.pl and provide information about departures for chosen stop.

License

Notifications You must be signed in to change notification settings

PiotrMachowski/Home-Assistant-custom-components-Rozkladzik

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HACS Default GitHub Latest Release GitHub All Releases Ko-Fi buycoffee.to PayPal.Me Revolut.Me

Rozkładzik sensor

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.
lines list
directions list

Example usage

sensor:
  - platform: rozkladzik
    city: 'wroclaw'
    stops:
      - id: 1281
        name: 'Plac Grunwaldzki'
        directions:
          - "Reja"
      - id: 94
        name: 'Rynek'
        stops_group_mode: true
        lines:
          - "33"

Installation

Using HACS (recommended)

This integration can be installed using HACS. To do it search for Rozkładzik in Integrations section.

Manual

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

Hints

  • 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.

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.

Support

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
  • PayPal
  • Credit card
  • Buy Me a Coffee at ko-fi.com
  • No fees
  • Single or monthly payment
  • buycoffee.to
  • BLIK
  • Bank transfer
  • Postaw mi kawę na buycoffee.to
    PayPal
  • PayPal
  • PayPal Logo
  • No fees
  • Revolut
  • Revolut
  • Credit Card
  • Revolut
  • No fees