Skip to content

This sensor uses unofficial API retrieved by decompilation of iMPK application to provide a list of MPK Wrocław news available in original app.

License

Notifications You must be signed in to change notification settings

PiotrMachowski/Home-Assistant-custom-components-iMPK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

iMPK sensor

These sensors use unofficial API retrieved by decompilation of iMPK application. Binary sensor provides a list of news available in the original app, sensor retrieves departures for desired stops.

Configuration options

Binary sensor

Key Type Required Default Description
name string False iMPK Name of sensor
monitored_conditions list True - List of conditions to monitor

Possible monitored conditions

Key Description
news List of news available in application

Sensor

Key Type Required Default Description
name string False iMPK Name of sensor
stops list True - List of stop configurations

Stop configuration

Key Type Required Default Description
id positive integer True - ID of a stop
name string False id Name of a stop
lines list False all available List of monitored lines.
directions list False all available List of monitored directions.

Example usage

binary_sensor:
  - platform: impk
    monitored_conditions:
      - news
sensor:
  - platform: impk
    stops:
      - id: 120820
      - id: 124202
        lines:
          - "D"
          - "131"
      - id: 124202
        name: "REJA"
        directions:
          - "REJA"

Installation

Using HACS (recommended)

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

Manual

To install this integration manually you have to download impk.zip and extract its contents to config/custom_components/impk directory:

mkdir -p custom_components/impk
cd custom_components/impk
wget https://github.com/PiotrMachowski/Home-Assistant-custom-components-iMPK/releases/latest/download/impk.zip
unzip impk.zip
rm impk.zip

Hints

  • These sensors provides attributes which can be used in HTML card or HTML Template card: html, html_timetable, html_departures
    • HTML card:
      - type: custom:html-card
        title: 'iMPK'
        content: |
          <big><center>News</center></big>
          [[ binary_sensor.impk_news.attributes.html ]]
          <big><center>Timetable</center></big>
          [[ sensor.impk_120820.attributes.html_timetable ]]
          <big><center>Departures</center></big>
          [[ sensor.impk_124202.attributes.html_departures ]]
    • HTML Template card:
      - type: custom:html-template-card
        title: 'iMPK'
        ignore_line_breaks: true
        content: |
          <big><center>News</center></big></br>
          {{ state_attr('binary_sensor.impk_news','html') }}
          </br><big><center>Timetable</center></big></br>
          {{ state_attr('sensor.impk_120820','html_timetable') }}
          </br><big><center>Departures</center></big></br>
          {{ state_attr('sensor.impk_124202','html_departures') }}
  • This integration is available in HACS.

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

    This sensor uses unofficial API retrieved by decompilation of iMPK application to provide a list of MPK Wrocław news available in original app.

    Topics

    Resources

    License

    Stars

    Watchers

    Forks

    Packages

    No packages published

    Languages