carohauta / oma-helen-ha-integration

Home Assistant integration for Oma Helen data
MIT License
37 stars 7 forks source link

Wrong value in helen_exchange_energy_last_month_total_cost when chosing delivery_site_id #22

Closed evgeni-semenov closed 6 months ago

evgeni-semenov commented 8 months ago

Hello,

First of all thanks for implementing an option to chose delivery_site_id!

I have multiply contracts, so after setting the correct delivery_site_id, it looks like helen_exchange_energy_last_month_total_cost is showing an incorrect value of "18", while OmaHelen shows the consumption for February as follows: Energy cost: 13,62 Distribution: 8,18 Tax: 5,62

Any idea on what might cause this?

carohauta commented 7 months ago

It also includes the contract's base price. If you don't want it to be included you can set default_base_price to 0 in the configuration.

evgeni-semenov commented 7 months ago

Thanks for the reply!

So the energy_last_month_total_cost = energy cost + base price?

Is there any way to include distribution and taxes also?

carohauta commented 7 months ago

At least spot prices already include taxes.

You could create a new template entity for a sum of all the prices. You can find template entity examples from the readme: https://github.com/carohauta/oma-helen-ha-integration?tab=readme-ov-file#exchange-electricity You would just change the value_template field to your liking: add up all the prices from any entities or entity attributes you want