erikarenhill / solaredge-modbus-hass

A custom platform component/sensor for reading SolarEdge Modbus TCP into Home Assistant https://home-assistant.io/
94 stars 31 forks source link

Meter block value types #16

Open marpi82 opened 4 years ago

marpi82 commented 4 years ago

I have noticed that these values isn't correct (they should be "signed int" no "unsigned"):

https://github.com/erikarenhill/solaredge-modbus-hass/blob/49d1cd4864abc1c9306f5a63e0c2ddf04fd4f4a9/custom_components/solaredge_modbus/sensor.py#L352-L353 https://github.com/erikarenhill/solaredge-modbus-hass/blob/49d1cd4864abc1c9306f5a63e0c2ddf04fd4f4a9/custom_components/solaredge_modbus/sensor.py#L360-L361 https://github.com/erikarenhill/solaredge-modbus-hass/blob/49d1cd4864abc1c9306f5a63e0c2ddf04fd4f4a9/custom_components/solaredge_modbus/sensor.py#L368-L369

I have also suggestion about configuration becouse most of people have configured modbus unit as 1 (first device), but I have as second. Could You made a little modification to configure these from hass

I say about these line (unit_id) https://github.com/erikarenhill/solaredge-modbus-hass/blob/49d1cd4864abc1c9306f5a63e0c2ddf04fd4f4a9/custom_components/solaredge_modbus/__init__.py#L36

erikarenhill commented 3 years ago

@marpi82 should be fixed with this PR, do you have the possibility to test this pr/branch to verify functionality before I merge? I don't have a separate meter to do this on my own. https://github.com/erikarenhill/solaredge-modbus-hass/pull/22