A Lovelace card to display the daily substitution plan from the Substitute App (based on vpMobil/Indiware). The Card only works on external Home Asistant Sites, not the ip-based internal ones. For internal use please take version 1.8 in HACS and skip the updates.
- Home Assistant externally forwarded.
- Nignx Proxy Manager
- Displays substitution plan for a specified class.
- Highlights changed items in red.
- Configurable to show or hide the date in the card header.
- Includes additional information from the substitution plan if available.
- Ensure you have HACS (Home Assistant Community Store) installed.
- In Home Assistant, navigate to HACS.
- Click on the three dots in the top right corner and select "Custom repositories".
- Add this repository URL (
https://github.com/Sergey842248/Substitute-Card) with category "Lovelace". - Search for "Substitute Card" in HACS and install it.
- Refresh your browser.
- Add the card to your Lovelace dashboard (see Configuration below).
-
Download the
substitute-card.jsfile from the latest release. -
Place the
substitute-card.jsfile in your Home Assistantconfig/www/directory. If thewwwdirectory doesn't exist, create it. -
Add the following to your
ui-lovelace.yamlor via the Raw Configuration Editor in Lovelace:resources: - url: /local/substitute-card.js type: module
-
Refresh your browser.
-
Add the card to your Lovelace dashboard (see Configuration below).
To use the card, add a new card to your Lovelace dashboard and select "Manual Card". Then, paste the following configuration, replacing the placeholder values with your actual details:
type: custom:substitute-card
schoolnumber: YOUR_SCHOOL_NUMBER
username: YOUR_USERNAME
password: YOUR_PASSWORD
class: YOUR_CLASS_NAME
show_date: true # Optional: Set to false to hide the date and header space. Defaults to true.-
Open your Nginx Proxy Manger Addon and click at the 3 dots next at your Home Assistant forwarding proxy entry.
-
Click
Editand open the tabCustom Locations, there you have to enter the following fields:Location: /stundenplan-proxy/ Scheme: https Forward Hostname/IP: stundenplan24.de Forward Port: 443
-
Click on the gear icon ("Advanced") and paste the following code:
# For Custom Location /stundenplan-proxy/ location /stundenplan-proxy/ { proxy_pass https://stundenplan24.de/; proxy_http_version 1.1; proxy_set_header Host stundenplan24.de; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; # Adapt Redirects (Location-Header) proxy_redirect https://stundenplan24.de/ /stundenplan-proxy/; proxy_redirect / /stundenplan-proxy/; # Adapt Cookies proxy_cookie_path / /stundenplan-proxy/; # Simple HTML/JS/CSS Rewriting sub_filter_types text/html text/css application/javascript; sub_filter_once off; sub_filter 'href="/' 'href="/stundenplan-proxy/'; sub_filter 'src="/' 'src="/stundenplan-proxy/'; }
-
Open the
SSLTab and activateHTTP/2 SupportandForce SSL -
Click Save