Need help with template (Prijsplafond)

Nice work, i am also dutch so the code is easy for me.

You have to change 1900 to 1200 for gas :

# Gas
pc_m3_year:
  min: 0
  max: 1200
  initial: 1200

Sharp eye! That’s a painful typo I made.

Hi Edouna,

If I take over the template sensor I have to change my .yaml to the following :

Resterend electriciteit (kWh) plafond huidig jaar percentage : sensor.electriciteit_kwh_plafond_per_jaar in plaats van sensor.electriciteit_kwh_per_jaar (plafond staat er niet tussen.)

Resterend gas (m³) plafond huidig jaar percentage :
sensor.gas_m3_plafond_per_jaar in plaats van sensor.gas_m3_per_jaar (plafond staat er niet tussen.)

Is this correct ?

It would be more appropriate.The word ceiling (plafond) was missing in my initial setup. Afterwards the entities were already created and I changed it in the friendly name via the UI. But the main idea is that you have a sensor that holds the allowance per utility per year.

1 Like

Nice! can you please explain what file where to place? I would really like this. also in the netherlands.

It depends on your configuration setup. I have splitted my configurations, as personal preference, like so:

image

Keep in mind that the template folder is needed, whereas then HA knows the platform is template.
Then I merge the files in configuration.yaml as follows:

image

Slight detail though, I have configured it in such as way I read a few Utility meters and use them to populate the sensors for the price ceiling. Use your own sensors/input what you deem necessary to get the trick done. :slight_smile:
I hope this helps!

Love it! Thanks a lot!

1 Like

Looks great! Have fun and enjoy your price ceiling insight! :wink:

1 Like

I am going to set this up for my parents as well. they have solar panels. I am using the sensors of DSMR and for the returning of energy I also have 2 sensors for low and high tarif. what would be your advice to add this?

I would suggest adding a sensor that keeps track of your parents solar panel production. Personally I would go for a couple of dedicated Utility meters that can capture the net consumption (basically meaning your production). Again, this is this personal preference on how I like to create sensors and reuse them later on.

You can expand the sensor probably like so:

- name: Resterend electriciteit (kWh) plafond huidige maand
  unique_id: kwh_ceiling_month_left
  state_class: measurement
  state: >
        {{ states('sensor.electriciteit_kwh_plafond_huidige_maand') | float(0) - ((states('sensor.energy_usage_peak_monthly') | float(0) + states('sensor.energy_usage_offpeak_monthly') - states('sensor.energy_production_monthly')) | float(0)) | round(2, default=0) }}

Where states('sensor.energy_production_monthly') is the new addition to subtract from the overall consumption and makes it a net consumption. Note the extra brackets >>)<< to probably form a formula structure.
Repeat this for the year and I’d say you’ve done the trick to make it a net consumption, including your parents solar panels.
Let me know if this works out for you. :slight_smile:

1 Like

up and running. Thanks!

2 Likes

we need an HACS plugin!

5 Likes

Hej,

Probably I’m looking over it, but what are the input sensors for Gas and Electricity?

1 Like

They originate from the dedicated utility meters, such as energy_usage_peak_monthly. Basically this is a utility meter I configured. You can do the same and link it the your power and gas consumptions.

2 Likes

I’ve edited your post to make the YAML part more readable for others :wink:

2 Likes

i am missing these sensors sensor.energy_usage_gas_monthly , sensor.energy_usage_offpeak_monthly and some others. How did you make these? I am using zonneplan.one intergration and they only send daily information

Looks like i need to make for Gas and Energie a Utility meter, what settings would i need?

That would be a very good start. To obtain a monthly cycle, I would suggest finding the Zonneplan P1 sensor that represents this value. The meter reset cycle should also be fixed to monthly - whereas this will the cycle pattern will give a good representation of the monthly usage of your utilities. I left out the supported tariffs. Once you fill in the meter reset cycle it should allow you to continue the form. Do this for all needed sensors to get the YAML-file working.

You can find the entity ID here:

Simply copy past the entity ID in the YAML should make the right reference.

I see 2 yearly gas sensors, what is the diffrence in meter setting?

  • type: custom:mushroom-entity-card
    entity: sensor.gas_m3_per_jaar
    icon: mdi:window-maximize
    icon_color: pink
    fill_container: false
    icon_type: none
    name: Plafond
    - type: custom:mushroom-entity-card
    entity: sensor.energy_usage_gas_yearly
    icon_type: none
    name: Verbruik m3

The top one (gas_m3_per_jaar) represents the total allowance of kubic meters of gas, within the price ceiling of this year. That is a static number, fixed to 1,200 m3 this year.
The other sensor is the cumulated amount of gas used of the current year. The basic dashboard makes a distinguish between the current running month and the running year - hopefully this gives good insight how the utility consumption is per month and on a total of the current year. :slight_smile:

Hey All,

Sorry to break your great setups, but there is something important that is missing.
In the calculations for your ‘prijsplafond’, you have to set the date of your year end invoice (jaarrekening)

Calculations need to be split in two parts:

  1. Everything until your year end invoice (1-1-2023 to year invoice date)
  2. Everthing after your year end invoice. (year invoice date - 31-12-2023)

Example: If your ‘jaarrekening’ is on the 24 feb 2023… you are allowed a total of 582,1 kWh power and 384,8 m3 gas from Jan1 to 24Feb… meaning after your year end invoice to year end, you always and only have 2900-582,1 = 2317,8 kWh and 1200-384,8=815,2 m3
You can download the full table with allowed daily use here: Hoeveelheden gas en stroom tegen de tarieven van het prijsplafond per dag | Publicatie | Rijksoverheid.nl

More info: Prijsplafond voor gas, stroom en stadsverwarming | Koopkracht | Rijksoverheid.nl

I’ve created sensors adding all use of power and gas and comparing that to the price ceiling before my ‘jaarrekening’ and for after… (but only if the ceiling price is higher than the new price)

Hope this helps!