Nanogreen is a Czech green energy supplier that offers electricity at spot market prices. This template connects TapHome to the Nanogreen customer API (moje.nanogreen.cz) over HTTPS, fetching today’s hourly spot prices and related indicators. No physical hardware is involved — the template is a pure data service that polls the API every 5 minutes.
The template provides 37 devices: 24 hourly price sensors, 6 cheapest-hour indicators (across off-peak, peak, and all-day windows), 6 binary sensors for real-time “is this the Nth cheapest hour” checks, and a live market price sensor.
Configuration
During template import, enter the Nanogreen API endpoint (moje.nanogreen.cz) as the host. The template communicates over HTTPS (port 443). No API key or authentication is required — the pricing data is publicly accessible.
Device capabilities
Hourly prices (24 sensors)
The template exposes one sensor for each hour of the day (0:00–1:00 through 23:00–0:00). Each sensor reads the corresponding value from the todayHourlyPrices array in the API response. Prices are in CZK/kWh.
These sensors update with every poll cycle (5 minutes). In practice, daily prices are published once per day, so the values remain stable throughout the day.
Cheapest-hour indicators (6 sensors)
Six sensors identify the cheapest and second-cheapest hours in three time windows:
- Off-Peak Cheapest Hour / Off-Peak 2nd Cheapest Hour — cheapest hours outside the energy peak period
- Peak Cheapest Hour / Peak 2nd Cheapest Hour — cheapest hours during the energy peak period
- All-Day Cheapest Hour / All-Day 2nd Cheapest Hour — cheapest hours across the entire day
Each sensor returns an hour index (0–23). For example, a value of 3 means the hour 3:00–4:00 is the cheapest in that window.
Binary sensors (6 sensors)
Six binary (on/off) sensors indicate whether the current hour ranks among the cheapest of the day:
- Is Cheapest Hour? — true if the current hour is the cheapest
- Is 2nd Cheapest Hour? — true if the current hour is the 2nd cheapest
- Is 3rd Cheapest Hour? — true if the current hour is the 3rd cheapest
- Is 4th Cheapest Hour? — true if the current hour is the 4th cheapest
- Is 5th Cheapest Hour? — true if the current hour is the 5th cheapest
- Is 6th Cheapest Hour? — true if the current hour is the 6th cheapest
These sensors are implemented as reed contacts (PacketParserReedContact) that parse the boolean API response into 0/1 values. They are the primary tool for automation — use them as conditions in Smart Rules to trigger actions during the cheapest hours.
Current market price (1 sensor)
The Current Spot Price sensor reads the live electricity market price from the OTE (Czech electricity market operator), converted to CZK using the CNB (Czech National Bank) exchange rate. This value reflects the real-time wholesale price in CZK/kWh.
Automation examples
Run appliances during cheapest hours
Use the binary sensors as conditions in a Smart Rule. For example, to heat a water boiler only during the 3 cheapest hours of the day:
- Create a Smart Rule with the condition: Is Cheapest Hour? = ON OR Is 2nd Cheapest Hour? = ON OR Is 3rd Cheapest Hour? = ON
- Set the action to turn on the boiler relay
- The boiler runs only when electricity is at its cheapest
Price threshold automation
Use the Current Spot Price sensor with a numeric condition. For example, turn on a heat pump only when the spot price drops below a threshold (e.g., 2.00 CZK/kWh).
Troubleshooting
Prices show zero or NaN
- Verify that the Nanogreen API is reachable — open
https://moje.nanogreen.cz/api/prices/dailyin a browser - Check that TapHome CCU has internet access (the API is a cloud service, not a local device)
- Prices for the next day are typically published in the afternoon — if queried too early, some fields may not be available yet
Binary sensors not updating
The binary sensors compare the current hour against the day’s price ranking. They update with each poll cycle (5 minutes). If a sensor stays in the wrong state, verify that the hourly price sensors contain valid data for today.
This template requires an active internet connection on the TapHome CCU. Unlike local device templates (Shelly, Modbus), the Nanogreen integration communicates with an external cloud API. Ensure your network firewall allows outbound HTTPS traffic to
moje.nanogreen.cz.