OTE-CR (Operátor trhu s elektřinou) is the Czech electricity and gas market operator. The TapHome template fetches Day-Ahead Market spot prices from the public OTE-CR API and exposes them as devices — current price, daily statistics, ranking, and time-window variants. Prices are published in EUR per MWh and the template includes a built-in currency conversion variable for displaying values in CZK.
The template polls the OTE-CR API once per hour and retrieves up to 96 hourly price periods (4 days of data). No authentication is required — the API endpoint is public.
Configuration
During template import, TapHome connects to www.ote-cr.cz over HTTPS (port 443). No IP address or credentials are needed — the endpoint is fixed.
Two optional import parameters control the time-window devices:
- From — start hour (0–23, default: 9) for the time window filter
- To — end hour (0–23, default: 17) for the time window filter
The defaults (9–17) cover standard working hours. Adjust to match your preferred analysis window.
After import, the Currency Exchange Rate (kurz) variable defaults to 1 — meaning all price devices display raw EUR/MWh values. Set it to the current EUR/CZK rate (e.g. 25.2) so that all price devices output values in CZK. You can set it manually in the device detail, or link it to the CNB exchange rate template for automatic daily updates (see below).
Device capabilities
Current price
The Current Price device reads the spot price for the current hour. The template determines the active period from the system clock and multiplies the EUR value by the exchange rate variable to output the price in CZK.
Price ranking
- Current Period Rank — the rank of the current hour’s price among all periods of the day (1 = cheapest, 24 = most expensive)
- Current Period Rank in Time Window — the same ranking but limited to the user-defined time window (From–To). Returns NaN if the current hour falls outside the window.
Daily price statistics
- Highest Price of Day — maximum spot price across all periods, converted to CZK
- Lowest Price of Day — minimum spot price across all periods, converted to CZK
- Average Price of Day — arithmetic mean of all periods, converted to CZK
Time-window price statistics
Each daily statistic has a windowed counterpart that filters periods to the From–To range:
- Highest Price in Time Window
- Lowest Price in Time Window
- Average Price in Time Window
All windowed devices return NaN if From >= To.
Period navigation
- Cheapest Period of Day — the 1-based period number of the cheapest hour in the day
- Cheapest Remaining Period — the cheapest hour from the current time onward
- Period Count — total number of available price periods (typically 96)
- Period Count in Time Window — number of periods within the From–To range
Currency Exchange Rate
The Currency Exchange Rate device is the only read-write device in the template. It stores the EUR to CZK conversion rate used by all price devices. Set it manually or link it to the CNB exchange rate template for automatic daily updates.
When the exchange rate is set to 1, all price devices output raw EUR values.
Service attributes
The template exposes 96 service attributes (Period 1 through Period 96), each showing the raw spot price in EUR for the corresponding hourly slot. These cover approximately 4 days of Day-Ahead Market data and are useful for diagnostics or for building custom automations that inspect specific future periods.
Linking with CNB exchange rate
To automate the EUR to CZK conversion:
- Import the CNB exchange rate template (Kurzy ČNB) into TapHome
- In the OTE-CR template, create a formula that reads the EUR/CZK rate from the CNB device and writes it to the Currency Exchange Rate device
- The CNB template updates the rate daily, so all OTE-CR prices automatically reflect the current exchange rate
Automation examples
Spot prices are most useful when combined with TapHome Smart Rules:
- Heat water during cheapest hours — compare the current period rank against a threshold (e.g. rank <= 4) and turn on the water heater only during the 4 cheapest hours of the day
- Charge batteries at off-peak — use the Current Price device to trigger battery charging when the price drops below a configurable limit
- Shift appliance load — use the Cheapest Remaining Period device to schedule washing machines, dishwashers, or EV charging for the next cheapest slot
- Time-window optimization — restrict automation to specific hours (e.g. 6:00–22:00) using the windowed devices, so overnight periods are excluded from ranking
Troubleshooting
All prices show zero or NaN
- Verify that TapHome CCU has internet access (the template connects to
www.ote-cr.czover HTTPS) - Check the Period Count device — if it shows 0, the API response is empty or parsing failed
- Ensure the Currency Exchange Rate device is set to a non-zero value — a rate of 0 will multiply all prices to zero
Time-window devices return NaN
- Verify the From and To import parameters are set correctly (From must be less than To)
- If the current hour is outside the From–To range, the rank-in-window device returns NaN by design
Prices seem outdated
The template polls the OTE-CR API every hour (3600 seconds). Day-Ahead Market prices are published by OTE the day before, typically around 12:45 CET. If the new day’s prices are not yet visible, wait until after the publication time.