fsaris / home-assistant-zonneplan-one

Unofficial Zonneplan integration for Home Assistant
https://github.com/fsaris/home-assistant-zonneplan-one
MIT License
104 stars 17 forks source link

Show electricity costs today and gas costs today in entity #67

Closed cscherpenisse closed 9 months ago

cscherpenisse commented 1 year ago

Is it possible to display Electricity costs today and Gas costs today in an additional entity?

This has been added to the Zonneplan app since last week.

CrazyHenk44 commented 1 year ago

I see a

zonneplan_p1_electricity_consumption_today_cost and one for gas, but the value seem seem to be 'unavailable' for both.

fsaris commented 9 months ago

Can you enable debug logging and check if the value is present in the data? (to enable debug logging see https://github.com/fsaris/home-assistant-zonneplan-one#troubleshooting)

I don't have a energy contract so also don't get these values

CrazyHenk44 commented 9 months ago

I don't see anything monetary in the debug output. It's all about usage and tariffs, but nowhere is a mention of the costs today/this month/this year or anything.

fschaal commented 9 months ago

For me im not seeing this sensor. Am I missing something?

fsaris commented 9 months ago

It's currently not yet in a official version. You need to install the main branch

martijnrusschen commented 9 months ago

When are you planning to release this? I’d love to capture this data in a sensor.

martijnrusschen commented 9 months ago

According to https://github.com/fsaris/home-assistant-zonneplan-one/compare/main...0.0.21 all code from the main branch is in the latest release. I've installed that version, but I can't find the sensor. Has anyone been able to get this sensor to work using the main branch? I've also looked at the debug logs but can't find a mention of the data mentioned.

fsaris commented 9 months ago

ah, sorry. The sensor that was added is a different one (gas price tomorrow).

If you can point to the value in the debug data that should be turned into a sensor that would be helpful. I don't have a energy contract so these values are not available to me.

Enable debugging https://github.com/fsaris/home-assistant-zonneplan-one#troubleshooting and try to find a value in the logs you can match with the value in the app.

martijnrusschen commented 9 months ago

Thanks for confirming, I thought I was going crazy :)

I'll take a closer look at the debug output tomorrow, I wasn't able to find anything related to cost yet. Just usage and tariffs so far.

fsaris commented 9 months ago

@martijnrusschen please test https://github.com/fsaris/home-assistant-zonneplan-one/releases/tag/0.0.22b3 :)

should have the values (sensors are disabled by default). Could be that the shown value should be formatted differently.

if value stays 0 then please check the debug logs for values

martijnrusschen commented 9 months ago

Amazing! I installed the beta version and can confirm the sensors are showing up. I don't have a gas contract, so I enabled the electricity sensors only.

Electricity delivery cost: Screenshot 2023-12-05 at 20 46 48@2x

This could probably be rounded to 2 decimals.

Electricity produced cost: Screenshot 2023-12-05 at 20 49 55@2x

It looks like I didn't produce energy today, which is correct assuming that's the reason it's unknown. I'll keep an eye on this tomorrow to see if it changes.

CrazyHenk44 commented 9 months ago

In beta 3 I can confirm the costs are now visible in HA.

Safari Thuis — Overzicht – Home Assistant 21 51 46@2x

fsaris commented 9 months ago

@martijnrusschen @CrazyHenk44 are the amounts equal to what is shown in the Zonneplan APP (no additional multiply or divide by 10 needed)?

CrazyHenk44 commented 9 months ago

They are correct as is and match the Zonneplan app.

fsaris commented 9 months ago

Released with 0.0.22