fix issue with incorrect state class (bpRemainWatth issue)#57
fix issue with incorrect state class (bpRemainWatth issue)#57
Conversation
|
Hi, nice to hear from you. I had already made a fix, but I generally changed Wh in STATE_CLASS_MAPPING to But I've now seen that Wh is also used in "bpTotalChgEnergy" and "bpTotalDsgEnergy". These values just keep increasing. Your solution might be better after all. I'll have to take another look. |
|
First and foremost: can you update the title to be more descriptive? Looking at this change a bit more, would it perhaps be clearer if we move this It already tells the two cases apart by the |
|
@niltrip I revised the changes to address the comment from @MarijnS95 Fixes #51
|
|
@jdammers unfortunately that isn't entirely what I meant. Would you mind if I open a PR with my version of these changes, that would save some of the back-and-forth?
Looking at the history, it seems that only a few specific keys were mapped to units, and everything which contained It seems fine to leave (Also it's really hard to work off of screenshots, having a |
|
@MarijnS95 Feel free to create a pull request. You're absolutely right about the integer, but i did not change the value! |
|
@MarijnS95 @niltrip |
|
@niltrip you still got a lot of things done for "not being a programmer", kudos! Forgot to mention here to @jdammers that that PR is open at #60. I also left a bit of an offtopic comment on the situation with there being many concurrent EcoFlow integrations out in the wild already, and plans to condense...
That's the |
|
Thanks for the work i integrate the fix on my branch |



I have set the state class to SensorStateClass.MEASUREMENT and modified SensorMapping.get_sensor_state_class in sensor.py
After these changes I don't see any logs referring to the wrong state class for sensor.powerocean_bpremainwatth