marstek-venus-rs485-node-red icon indicating copy to clipboard operation
marstek-venus-rs485-node-red copied to clipboard

Zonneplan: support new quarter-hourly prices (sensor.zonneplan_current_quarter_hourly_electricity_tariff)

Open SuperTus opened this issue 4 months ago • 1 comments

Problem

Since 1 August 2026 Zonneplan delivers 15-minute prices.

The official integration now provides:

  • sensor.zonneplan_current_quarter_hourly_electricity_tariff (15-min)
  • older hourly sensors still exist

In 02 strategy-dynamic-2.json the Zonneplan case is still hard-coded to the old hourly sensor:

msg.dynamic.sensor = 'sensor.zonneplan_current_electricity_tariff';

Additional complication The new quarter-hourly sensor uses a different data structure:

start_date instead of start nested price_tax_included.amount (needs / 10000000) instead of flat electricity_price

Because of this, simply changing the sensor name is not enough. TheFes Cheapest Energy Hours is not yet updated to use this format, there is already an issue for this, but I not sure how this should be fixed, since some users might want to stick to using hourly prices.

Workaround that works I created a template sensor that flattens the data to the old format and pointed HBC to that sensor. Dynamic strategy then correctly shows 15-minute intervals (datapoints_per_hour: 4).

template:

  • sensor:
    • name: "Zonneplan Quarter Hourly for HBC" unique_id: zonneplan_quarter_hourly_for_hbc state: "{{ states('sensor.zonneplan_current_quarter_hourly_electricity_tariff') | float(0) }}" unit_of_measurement: "€/kWh" device_class: monetary state_class: measurement attributes: forecast: > {% set src = state_attr('sensor.zonneplan_current_quarter_hourly_electricity_tariff', 'forecast') | default([], true) %} {% set ns = namespace(list=[]) %} {% for item in src %} {% set price = item.price_tax_included.amount | float(0) / 10000000 %} {% set ns.list = ns.list + [{ 'start': item.start_date, 'electricity_price': price }] %} {% endfor %} {{ ns.list }}

In NodeRed, 'Strategy Dynamic v4.13.0', 'Data Source Setting', 'switch (msg.dynamic.data_source)'. I changed this: case "Zonneplan": log(this,"Processing Zonneplan quarter-hourly data via template sensor."); msg.dynamic.sensor = 'sensor.zonneplan_quarter_hourly_for_hbc'; msg.dynamic.source_settings = 'zonneplan'; // nu werkt dit weer msg.dynamic.value_conversion = 1; // al omgerekend naar euro break;

With this workaround HBC uses the Zonneplan quarterly prices.

Request Please update the Zonneplan case so it works with the new quarter-hourly sensor (or document the required template sensor).

SuperTus avatar Aug 03 '26 13:08 SuperTus

Solved in release v4.14.0

SuperTus avatar Aug 20 '26 15:08 SuperTus