Gas Cost Fixed Monthly Subscriber Fee

I have Gas sensor and I pay 6.15 PLN per m3, but I also have Fixed Monthly Subscriber Fee for 25.5 PLN which does not not depend on my monthly m3 gas consumption.
My monthly total cost for Gas is 25.5 PLN + (6.15 PLN/m3 * m3 consumption in this month)

How can I add this 25.5 PLN Fixed Monthly Subscriber Fee to be shown in Energy dashboard like this?
Screenshot_2023-05-07_20-19-41

I tried to create 2 sensors:

# gas sensor for energy board
  - sensor:
      - name: Gas Monthly Subscription Fee
        unique_id: gas_monthly_subscription_fee
        state: 0
        unit_of_measurement: mÂł
        device_class: gas
        state_class: total_increasing
# gas sensor total cost entity
  - sensor:
      - name: Gas Monthly Subscription Fee PLN
        unique_id: gas_monthly_subscription_fee_pln
        state: 25.5
        unit_of_measurement: PLN
        state_class: total_increasing
        device_class: monetary

And added gas_monthly_subscription_fee sensor to Gas source at Energy dashboard configuration, where I selected gas_monthly_subscription_fee_pln as “entity tracking total cost”.

But unfortunately it does not work. Energy dashboard shows cost 0.00 PLN next to gas_monthly_subscription_fee
Screenshot_2023-05-07_20-31-30

Is that a bug or what did I do wrong, how can I fix it?

Is requested a few times but not feasible yet. My solution is to spread it out over the cost/m3, i.e. I took last years annual consumption for that. Not exact but not that bad too

1 Like

Could you share your example? Let’s say for 25 USD subscription fee per month

Last year I consumed 897m3
My annual subscription and other charges were 380EUR, so I add 0,42EUR to the m3 price making it 0,8 in total
Again, not exact but good enough for me

Hoping that one day we are able to do more complex calculations. I understand that my use case wouldn’t be possible using the statistics functionality as it exists right now as the charge per kWh depends on the total monthly usage for that month.

Here’s the doozy of a calculation for my energy:

  • Energy: $0.1736/kWh, but IF total energy usage for the month is between 500 kWh and 1000 kWh, then subtract $50
  • Delivery charge: $0.0392/kWh + $3.40/month
  • Tax #1: 2%
  • Tax #2: 0.17%
  • Tax #2: 2%

So:

867 kWh = ((867 kWh * $0.1736) - $50 + (867 kWh * $0.0392) + $3.40) * 1.02 * 1.0017 * 1.02 = $143.71
1140 kWh = ((1140 kWh * $0.1736) + (1140 kWh * $0.0392) + $3.40) * 1.02 * 1.0017 * 1.02 = $256.37

There’s a big leap when I exceed 1000 kWh because of the loss of the $50 credit, but luckily I have only had that happen 3 times in the past 12 months (1080 kWh, 423 kWh and 1140 kWh).