firstof9 / ha-openei

OpenEI integration for Home Assistant
MIT License
15 stars 2 forks source link

Support data from mincharge key in API #45

Closed coleya closed 3 years ago

coleya commented 3 years ago

Is your feature request related to a problem? Please describe. A minimum fee for each month of service is charged by PG&E leading to the cost sensor being consistently offset from it's true value.

Describe the solution you'd like I think it would be most convenient to detect which of the three possible units ($/day, month, year) are being used through the minchargeunits key and then add the value to the corresponding value sensor when the corresponding energy sensor resets.

Describe alternatives you've considered The simplest version of this I can imagine would give a sensor with the value of mincharge and that has minchargeunits as an attribute. The compensation and detection of when the sensor resets would then be left as an exercise for the user.

Additional context API reference

firstof9 commented 3 years ago

Please see if 0.1.5-b8 provides the information.

coleya commented 3 years ago

I installed it and it reads 10.11 $/month as expected now I just have to figure out how to do the compensation. Thanks for the feature.