Open StealthChesnut opened 2 years ago
Likely related to Discussion https://github.com/StealthChesnut/HA-FoxESS-Modbus/discussions/9
Don't know if this helps, I changed how system_losses are calculated in my setup, using RPower 31008. More details in the code snippet here: https://foxesscommunity.com/viewtopic.php?p=907&sid=9a6298b7f5e2a6a928328633d103530a#p907
Thanks Tony - appreciate the contribution. I'm not sure how we'd verify how accurate any approach is. Any thoughts @Daibutt ?
I've added a comment to the disucssion on the community forum linked above, as the calculations depend on some sensor name changes in your code. I made these changes for consistency between USB and LAN and also to align more with Nathan Marlor. May be worth having a look to see if you want to incorporate any of the changes into the next release?
Ideally, I think the various names would be resolved by adding consistent unique_ids to the entities, so this is something I am also looking into.
oops - looked at the code I posted and realised I hadn't actually copied the code I use for System Losses! Corrected this now.
The system losses sensor using LAN config appears to be reading more like a current power generation figure, not a losses figure. In the USB config it may not be accurate or is giving some surprisingly high figures.
Units may be wrong, or source data may be wrong (incorrect register definition in the LAN config?)
Need to check data source registers are correct in LAN config (or at least match the USB config), then check the implementation of the sensor template.