https://github.com/piotrmachowski/home-assistant-custom-components-impk
This sensor uses unofficial API retrieved by decompilation of iMPK application to provide a list of MPK Wrocław news available in original app.
https://github.com/piotrmachowski/home-assistant-custom-components-impk
custom-component home-assistant integration public-transport wroclaw
Last synced: 27 days ago
JSON representation
This sensor uses unofficial API retrieved by decompilation of iMPK application to provide a list of MPK Wrocław news available in original app.
- Host: GitHub
- URL: https://github.com/piotrmachowski/home-assistant-custom-components-impk
- Owner: PiotrMachowski
- License: mit
- Created: 2019-06-24T22:18:47.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-04-05T00:26:14.000Z (about 2 months ago)
- Last Synced: 2025-04-23T12:04:30.505Z (27 days ago)
- Topics: custom-component, home-assistant, integration, public-transport, wroclaw
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 17
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[![HACS Default][hacs_shield]][hacs]
[![GitHub Latest Release][releases_shield]][latest_release]
[![GitHub All Releases][downloads_total_shield]][releases]
[![Ko-Fi][ko_fi_shield]][ko_fi]
[![buycoffee.to][buycoffee_to_shield]][buycoffee_to]
[![PayPal.Me][paypal_me_shield]][paypal_me]
[![Revolut.Me][revolut_me_shield]][revolut_me][hacs_shield]: https://img.shields.io/static/v1.svg?label=HACS&message=Default&style=popout&color=green&labelColor=41bdf5&logo=HomeAssistantCommunityStore&logoColor=white
[hacs]: https://hacs.xyz/docs/default_repositories[latest_release]: https://github.com/PiotrMachowski/Home-Assistant-custom-components-iMPK/releases/latest
[releases_shield]: https://img.shields.io/github/release/PiotrMachowski/Home-Assistant-custom-components-iMPK.svg?style=popout[releases]: https://github.com/PiotrMachowski/Home-Assistant-custom-components-iMPK/releases
[downloads_total_shield]: https://img.shields.io/github/downloads/PiotrMachowski/Home-Assistant-custom-components-iMPK/total# iMPK sensor
These sensors use unofficial API retrieved by decompilation of [*iMPK*](https://play.google.com/store/apps/details?id=pl.wasko.android.mpk) 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
```yaml
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](https://hacs.xyz/) (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*](https://github.com/PiotrMachowski/Home-Assistant-custom-components-iMPK/releases/latest/download/impk.zip) and extract its contents to `config/custom_components/impk` directory:
```bash
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*](https://github.com/PiotrMachowski/Home-Assistant-Lovelace-HTML-card) or [*HTML Template card*](https://github.com/PiotrMachowski/Home-Assistant-Lovelace-HTML-Template-card): `html`, `html_timetable`, `html_departures`
* HTML card:
```yaml
- type: custom:html-card
title: 'iMPK'
content: |
News
[[ binary_sensor.impk_news.attributes.html ]]
Timetable
[[ sensor.impk_120820.attributes.html_timetable ]]
Departures
[[ sensor.impk_124202.attributes.html_departures ]]
```
* HTML Template card:
```yaml
- type: custom:html-template-card
title: 'iMPK'
ignore_line_breaks: true
content: |
News
{{ state_attr('binary_sensor.impk_news','html') }}
Timetable
{{ state_attr('sensor.impk_120820','html_timetable') }}
Departures
{{ state_attr('sensor.impk_124202','html_departures') }}
```
* This integration is available in [*HACS*](https://github.com/custom-components/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

buycoffee.to
PayPal

Revolut

### Powered by
[](https://jb.gg/OpenSourceSupport)
[ko_fi_shield]: https://img.shields.io/static/v1.svg?label=%20&message=Ko-Fi&color=F16061&logo=ko-fi&logoColor=white
[ko_fi]: https://ko-fi.com/piotrmachowski
[buycoffee_to_shield]: https://shields.io/badge/buycoffee.to-white?style=flat&labelColor=white&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABhmlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw1AUhU9TpaIVh1YQcchQnayIijhKFYtgobQVWnUweemP0KQhSXFxFFwLDv4sVh1cnHV1cBUEwR8QVxcnRRcp8b6k0CLGC4/3cd49h/fuA4R6malmxzigapaRisfEbG5FDLzChxB6MIZ+iZl6Ir2QgWd93VM31V2UZ3n3/Vm9St5kgE8knmW6YRGvE09vWjrnfeIwK0kK8TnxqEEXJH7kuuzyG+eiwwLPDBuZ1BxxmFgstrHcxqxkqMRTxBFF1ShfyLqscN7irJarrHlP/sJgXltOc53WEOJYRAJJiJBRxQbKsBClXSPFRIrOYx7+QcefJJdMrg0wcsyjAhWS4wf/g9+zNQuTE25SMAZ0vtj2xzAQ2AUaNdv+PrbtxgngfwautJa/UgdmPkmvtbTIEdC3DVxctzR5D7jcAQaedMmQHMlPSygUgPcz+qYcELoFulfduTXPcfoAZGhWSzfAwSEwUqTsNY93d7XP7d+e5vx+AIahcq//o+yoAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5wETCy4vFNqLzwAAAVpJREFUOMvd0rFLVXEYxvHPOedKJnKJhrDLuUFREULE7YDCMYj+AydpsCWiaKu29hZxiP4Al4aWwC1EdFI4Q3hqEmkIBI8ZChWXKNLLvS0/Qcza84V3enm/7/s878t/HxGkeTaIGziP+EB918nawu7Dq1d0e1+2J2bepnk2jFEUVVF+qKV51o9neBCaugfge70keoxxUbSWjrQ+4SUyzKZ5NlnDZdzGG7w4DIh+dtZEFntDA98l8S0MYwctNGrYz9WqKJePFLq80g5Sr+EHlnATp+NA+4qLaZ7FfzMrzbMBjGEdq8GrJMZnvAvFC/8wfAwjWMQ8XmMzaW9sdevNRgd3MFhvNpbaG1u/Dk2/hOc4gadVUa7Um425qii/7Z+xH9O4jwW8Cqv24Tru4hyeVEU588cfBMgpPMI9nMFe0BkFzVOYrYqycyQgQJLwTC2cDZCPeF8V5Y7jGb8BUpRicy7OU5MAAAAASUVORK5CYII=
[buycoffee_to]: https://buycoffee.to/piotrmachowski
[buy_me_a_coffee_shield]: https://img.shields.io/static/v1.svg?label=%20&message=Buy%20me%20a%20coffee&color=6f4e37&logo=buy%20me%20a%20coffee&logoColor=white
[buy_me_a_coffee]: https://www.buymeacoffee.com/PiotrMachowski
[paypal_me_shield]: https://img.shields.io/static/v1.svg?label=%20&message=PayPal.Me&logo=paypal
[paypal_me]: https://paypal.me/PiMachowski
[revolut_me_shield]: https://img.shields.io/static/v1.svg?label=%20&message=Revolut&logo=revolut
[revolut_me]: https://revolut.me/314ma