Resolves #21 - the card did not previously take into account the configurable unit_of_measurement attribute available in the GivTCP entities. This PR fixes the issue, in addition to refactoring the code to pre-calculate all statistics during render time in a single object. Thanks to @gcoan for reporting the issue.
Add GivTcpBatteryStats type
Add setRawValues method to grab GivTCP data at render time
Pre-calculate battery stats based on raw values and GivTCP's unit_of_measurement value if available
Resolves #21 - the card did not previously take into account the configurable
unit_of_measurement
attribute available in the GivTCP entities. This PR fixes the issue, in addition to refactoring the code to pre-calculate all statistics during render time in a single object. Thanks to @gcoan for reporting the issue.GivTcpBatteryStats
typesetRawValues
method to grab GivTCP data at render timeunit_of_measurement
value if available