SonnenladenGmbH / APsystems-EZ1-API-HomeAssistant

The APsystems EZ1 Integration offers a streamlined interface for interacting with the local API of APsystems EZ1 Microinverters using Home Assistant.
MIT License
77 stars 11 forks source link

normal integeration via add-on store #20

Closed tcurdt closed 3 months ago

tcurdt commented 3 months ago

Any progress on changing the fact that

this is not a regular HA add-on that can be installed by just searching for it inside the add-on store.

?

mawoka-myblock commented 3 months ago

The problem is that the code would have to comply with HA's standards, which it doesn't and it would be a lot of work for, in my eyes, not much.

tcurdt commented 3 months ago

Could you elaborate on what standards it does not comply to?

mawoka-myblock commented 3 months ago

I can't remember exactly, but I think it was something regarding the data-fetching, as it's quite inefficient right now, as the data is getting fetched multiple times, but as I'm not a HA profi, it seemed quite complex to mitigate this issue.

tcurdt commented 3 months ago

Is there a link to where this was discussed?

mawoka-myblock commented 3 months ago

No, I discussed that with myself. ;) All in all, the problem is that the same data gets fetched multiple times. I also don't really feel comfortable in this regard, as I am not really experienced regarding HA development.

As you can see in the https://github.com/SonnenladenGmbH/APsystems-EZ1-API-HomeAssistant/blob/main/custom_components/apsystemsapi_local/sensor.py file, the data gets pulled multiple times.

tcurdt commented 3 months ago

No, I discussed that with myself. ;)

Well, it's hard to argue then ;-)

But what are the HA standards for add-ons? Is this just you feeling it's not good enough? :)

As for the multiple calls - I guess it depends what options there are. Does the EZ1 API allow to read data in bulk? If so I don't think it's that complex to change.

mawoka-myblock commented 3 months ago

No, I discussed that with myself. ;)

Well, it's hard to argue then ;-)

But what are the HA standards for add-ons? Is this just you feeling it's not good enough? :)

As for the multiple calls - I guess it depends what options there are. Does the EZ1 API allow to read data in bulk? If so I don't think it's that complex to change.

I am now going to look into the last point.

mawoka-myblock commented 3 months ago

I fixed the last point. Will have to check if it's okay for @SonnenladenGmbH if this integration gets integrated into HA core. If so, I'll create a PR there and ping you in there, if that's fine for you.