gcarmix / azzurrozcs

Azzurro ZCS Solar Inverter Integration for Home Assistant
10 stars 3 forks source link

Reading of values does not work in HA 2023.4.0 #2

Closed Viktor-36 closed 1 year ago

Viktor-36 commented 1 year ago

Hello,

There is issue with this integration in new version of Home Assistant (2023.4.0).

Fix can be done by adding encoding to the parameters of RestData. I tested it in my Home Assistant. I wanted to create a pull request, but I have no permissions to do it.

https://github.com/gcarmix/azzurrozcs/blob/e155847595a5d8eaaedf24c04b920e369ad0c496/sensor.py#L67

Suggested change:

    rest = RestData(hass, method, zcs_address, 'utf8', auth, headers, None, None, verify_ssl, timeout)
gcarmix commented 1 year ago

Hi Viktor, I have seen that RestData class has been changed in Home Assistant 2023, anyway if I simply integrate your mod into my code I would break compatibility with older versions, so I you want to integrate your mod into my repository no problems, as long as you also add a version check on top of it. As for the pull request I checked and I have no limitations on who can make pull-requests, so, feel free to do it.

Carmix

gcarmix commented 1 year ago

@Viktor-36 I have found some time to correct the issue, you can find on the repository the updated version, it has check condition to be compatible with both versions. Thank you for posting the issue.