Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Support for two different tariffs (Feed-in tariff and purchase tariff) #8

Open
ar-ml opened this issue Feb 3, 2024 · 4 comments
Labels
backlog Good candidate to be implemented in a future version enhancement New feature or request

Comments

@ar-ml
Copy link

ar-ml commented Feb 3, 2024

Hi,
so far your sensor add-on really works great!

Feature request:
I think many people that use your integration will have a pv panel installation. For example I have a different feed-in tariff and purchase tariff and created two helpers for it:

  • sensor.my_gross_purchase_tariff = sensor.epex_spot_data_net_price (configured with an absolute surcharge of 1.2 ct /kWh and Tax 20%).
  • sensor.my_gross_feed_in_tariff = sensor.epex_spot_data_price / 10 * 1.2

(both in ct/kWh)

Now I tried to solve that with a helper that combines both tariffs, that changes if I currently have PV surplus electricity:
sensor.my_gross_combined_price =
{% if states('sensor.mySmartmeter_total_power_togrid') | float > 5 %}
{{ states('sensor.my_gross_feed_in_tariff') }}
{% else %}
{{ states('sensor.my_gross_purchase_tariff') }}
{% endif %}

So the value of the sensor.my_gross_combined_price helper switches from sensor.my_gross_purchase_tariff to sensor.my_gross_feed_in_tarif if I am currently feeding in more than 5 Watts into the grid.

This basically works but unfortunately I can not use my sensor.my_gross_combined_price as a Price Input Sensor for your ha_epex_spot_sensor. The reason is, I guess, that my combined price sensor only contains data about the present and no attributes for the future.

So I guess we need a different approach here. My proposal would be, that you add the following fields to the configuration of your EPEX Spot Binary Sensor:

grafik

Could you implement this?
Or is there a more elegant way to achieve my goal?
thank you very much!

@mampfes mampfes added the enhancement New feature or request label Feb 4, 2024
@mampfes
Copy link
Owner

mampfes commented Feb 4, 2024

Interesting request. Let me check. But I think it is not that easy because you need to know upfront when to switch to the feed-in tariff.
Could you share a link or description of the feed-in tariff from your energy supplier?

@ar-ml
Copy link
Author

ar-ml commented Feb 4, 2024

My gross Feed in Tarif is just EPEX Spot AT * 1.2 (20 % VAT).
My gross Purchase Tarif is (EPEX Spot AT + absolute surcharge of 1.2 ct /kWh) * 1.2 (20% VAT).

You are right, it would be necessary to "predict" when to switch between tariffs. The underlying logic is simple: Whenever my PV installations produces more energy than I consume in my house, the feed in tariff is used. Whenever I consume more than I produce, the Purchase tarif is used.
Of course an exact prediction is impossible, because you never know in advance what I will consume or produce. But I think it does not have to be very precise, a rough estimation would be enough.
The goal is, to find the cheapest hours when to load my warm water boiler and start my washing machine...

For the prediction how much energy I will produce in a certain hour in the future, we could probably just use the following sensors provided by Forecast Solar :
sensor.power_production_next_24hours (in Watt).
or maybe better:
sensor.energy_production_today (in kWh)
and
sensor.energy_production_tomorrow (in kWh)

For the prediction how much energy I will consume I would just simply add a field where the user can enter a value. For example I know that the base load of my house is about 150W (=0,15kWh each hour).
I might just enter that value (or a bit more) and I think the results might be accurate enough.

What do you think, is this doable?

@mampfes
Copy link
Owner

mampfes commented Feb 11, 2024

A solution that includes solar forecast and (if available) SOC of a battery is on my wishlist. But this is a major enhancement and will take time.

@mampfes mampfes added the backlog Good candidate to be implemented in a future version label Feb 11, 2024
@ar-ml
Copy link
Author

ar-ml commented Feb 11, 2024

@mampfes
Thx for your reply!
I just sent you a little donation via paypal to express my appreciation for your work.
Please let me know once this feature is implemented. Also let me know if I can do something to speed up the process and help you. ;-) Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Good candidate to be implemented in a future version enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants