Home Assistant custom integration and Lovelace card to display today's schedule for Polskie Radio Dzieciom.
- Fetches today's schedule from
https://apipr.polskieradio.pl/api/schedule?Program=11with browser-like headers. - Sensor
sensor.polskie_radio_dzieciom_scheduleholds the current item title, with attributes for current, next, and rest of day (including progress, remaining time, and formatted times). - Sensor
sensor.polskie_radio_dzieciom_now. - Sensor
sensor.polskie_radio_dzieciom_next. - Lovelace card
prd-cardshows current programme with progress bar, next with start time, and an expandable list for the rest of the day.
- In HACS, go to Integrations ➜ Custom repositories ➜ Add:
- Repository:
https://github.com/seler/ha-prd - Category:
Integration
- Repository:
- Install the repository. Restart Home Assistant.
- Go to Settings ➜ Devices & services ➜ Add integration ➜ search for "Polskie Radio Dzieciom" and add it.
- Frontend card (manual):
- Copy
www/community/prd-card/prd-card.jsfrom this repository into your HA config at/config/www/prd-card/prd-card.js(create the folder if needed). - In Settings ➜ Dashboards ➜ Resources, add:
- URL:
/local/prd-card/prd-card.js?v1 - Type:
module
- URL:
- If the card doesn't update after replacing the file, bump the resource URL with a version, e.g.
/local/prd-card/prd-card.js?v=2, and hard-refresh the browser.
- Copy
- type: 'custom:prd-card'
entity: sensor.polskie_radio_dzieciom_schedule- In HACS, open the repo and click Update when available, then restart HA.
- Copy the updated
www/community/prd-card/prd-card.jsinto/config/www/prd-card/. - Update resource version (
?vN+1). - Restart HA.
