juicejuice / homeassistant_redback

Home Assistant integration for inverter and battery systems from Redback Technologies
7 stars 2 forks source link

Added Current Sensors, Net Sensors #10

Closed cabberley closed 2 months ago

cabberley commented 1 year ago

This pull request has updates to provide more sensors

Tested changes with my ST10000 Hybrid 3 phase

juicejuice commented 1 year ago

Thanks so much for the contributions! Lots of extra sensors :) I feel like some of the sensors such as serial number should perhaps be device info rather than sensors but that's just a hunch. I'm no HA guru. Also, I wonder if we can have someone test on single phase just to make sure the new sensors work in that scenario. Two specific things before we merge:

  1. The use of "SensorDeviceClass.ENERGY_STORAGE" means we now need minimum HA level of 2023.4 to be set in hacs.json, can you please do that?
  2. The battery level is no longer shown correctly in the device info screen. Any chance you can look into a fix? image
cabberley commented 1 year ago

Thanks for the feedback. I have updated the code and cleaned it up. the HA Version requirement has been updated in the json file as well.

The icon on the device screen, can't find any doco on how that is driven, after working through it, it appears it automatically selects sensors which has percent assigned to it and then displays the one with the lowest value.

So I have shifted a few metrics to extended attributes on Battery Capacity, Inverter Status and Battery SoC. This addresses the problem and also cleans up the sensor list a bit.

You may also like to have a look at this repo that sets up everything to actually control the Hybrid inverter status, it does require you to store your portal email & password, which is being done using secrets file. It does require my main branch to get the right data from the redback integration as there are a couple of items it needs which aren't in your main branch yet.

https://github.com/cabberley/Home-Assistant_Redback_Invertor_Mode_Set