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

Growatt - Add support for Energy Integration #53963

Closed
brhahlen opened this issue Aug 4, 2021 · 10 comments · Fixed by #54174
Closed

Growatt - Add support for Energy Integration #53963

brhahlen opened this issue Aug 4, 2021 · 10 comments · Fixed by #54174

Comments

@brhahlen
Copy link

brhahlen commented Aug 4, 2021

The problem

As described for the new Energy integration, I was guided here to point the developer of the Growatt Integration to https://developers.home-assistant.io/docs/core/entity/sensor#long-term-statistics, to ensure that the integration works with the Energy Dashboard. :-)

What is version of Home Assistant Core has the issue?

core-2021.8.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Growatt

Link to integration documentation on our website

https://www.home-assistant.io/integrations/growatt_server/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@probot-home-assistant
Copy link

Hey there @indykoning, @muppet3000, mind taking a look at this issue as it has been labeled with an integration (growatt_server) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)


growatt_server documentation
growatt_server source
(message by IssueLinks)

@muppet3000
Copy link
Contributor

muppet3000 commented Aug 5, 2021

@brhahlen thanks for raising this. I was completely out of the loop on this new "energy" functionality that has been added.

Can I ask how you were guided here? Was it through the hass forums or through discord? I just like to try and keep an eye on anything related to the growatt integration.

I will look at the documentation links you provided and see what I can do to make it all work, it looks like a really nice dashboard functionality so worth the effort.

I've marked bug 18754 as a duplicate of this and will post all updates associated with this functionality and it's implementation against this issue.

I can't guarantee when I'll get to implement it as I've got a busy weekend ahead, but I'll see what I can do!

@brhahlen
Copy link
Author

brhahlen commented Aug 5, 2021

Hi @muppet3000!
Thanks for the reply.

I was guided here by the Energy Integration configuration itself. If you head to the Configuration --> Energy page, you are then able to add Solar Panel Production. It lists the different sensors that can be added, and has a link "Why is my entity not listed", which in turn guides you to https://www.home-assistant.io/more-info/statistics/, which has a link to https://developers.home-assistant.io/docs/core/entity/sensor#long-term-statistics and the suggestion to open an issue.

Long story short: It's in HASS itself :)

No real rush, would just be good to get it working!
Thanks for the effort!

@muppet3000
Copy link
Contributor

@brhahlen thanks. I clearly need to do an upgrade on my HASS instance and also pull the latest code on my dev machine!!

On the face of it, shouldn't be too hard to implement, just got to find the time to do it and then test it.
It's an excuse to refactor a bit of the code that's been annoying me for a while as well :)

I'll update when I make some progress.

@RualdOrdelman
Copy link

Would be great @muppet3000

Thanks for spending your time for this Growatt integration.

@AntonieB
Copy link

AntonieB commented Aug 6, 2021

Just to let you guys know I have the same 'issue' and whould love to get my Growat information on the Energy panel. Thanks already for your time spend on this plugin!!

@herver1971
Copy link

Here is someone else who is interested in making this work. Unfortunately I do not have the knowledge to help in the implementation of the code, but count on me to test that it works correctly and report bugs if they appear

@Domo36
Copy link

Domo36 commented Aug 12, 2021

FYI: As a workaround you can create a template sensor which you can use in the new Energy dashboard. Sensor needs to have a state_class of measurement, here's an example template sensor:

template:
- sensor:
- name: growatt_bruto_energy
state: "{{ states('sensor.growatt_total_lifetime_energy_output') }}"
unit_of_measurement: 'kWh'
state_class: measurement
device_class: energy
attributes:
last_reset: '1970-01-01T00:00:00+00:00'

@muppet3000
Copy link
Contributor

Thanks @Domo36.
If anyone is interested in an update on this have a look at the PR here: #54174
All the code is written and tested, I just need @maschel to confirm merging my changes in.

If I haven't heard anything back from him by the end of the weekend I'll raise a new PR with the changes (not the cleanest solution but it'll get it added).

FYI - For those of you with "mixed" systems (i.e. you have a battery) there isn't yet battery support in HomeAssistant, but I've added all the relevant code to the mixed Growatt implementation so that it should just work when it's added (pray for me on that one :P)

If anyone wants a sneak preview:
image

@muppet3000
Copy link
Contributor

Update for those of you keenly waiting on this. The recent merges to Dev in Core have added the battery functionality, so I've been able to test what it looks like:
image

The PR was ready to merge, but some really nice new functionality to add support for these measurements has been added so we've been asked to make use of it.
Once that's all been merged in (I've done the code it just needs to be combined into the PR by Maschel now) we should be good to go.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants