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.
Key | Type | Required | Default | Description |
---|---|---|---|---|
name |
string |
False |
iMPK |
Name of sensor |
monitored_conditions |
list |
True |
- | List of conditions to monitor |
Key | Description |
---|---|
news |
List of news available in application |
Key | Type | Required | Default | Description |
---|---|---|---|---|
name |
string |
False |
iMPK |
Name of sensor |
stops |
list |
True |
- | List of stop configurations |
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. |
binary_sensor:
- platform: impk
monitored_conditions:
- news
sensor:
- platform: impk
lines:
- id: 120820
- id: 124202
lines:
- "D"
- "131"
- id: 124202
name: "REJA"
directions:
- "REJA"
Download binary_sensor.py, sensor.py and manifest.json 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/raw/master/custom_components/impk/binary_sensor.py
wget https://github.com/PiotrMachowski/Home-Assistant-custom-components-iMPK/raw/master/custom_components/impk/sensor.py
wget https://github.com/PiotrMachowski/Home-Assistant-custom-components-iMPK/raw/master/custom_components/impk/manifest.json
- 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') }}
- HTML card:
- This integration is available in HACS.