Change the divisor for total consumption output (#14215)

According to my observations, the "switch_energy" value displayed by Pyfritzhome is the sum of Wh over the last week since measurement.
As a result, the correct divisor for representing output as kWh would be 1000 instead of 10000.
pull/14209/merge
Simon Hörrle 2018-05-01 20:13:35 +02:00 committed by Paulus Schoutsen
parent d82693b460
commit e78497789b
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ class FritzboxSwitch(SwitchDevice):
if self._device.has_powermeter:
attrs[ATTR_TOTAL_CONSUMPTION] = "{:.3f}".format(
(self._device.energy or 0.0) / 100000)
(self._device.energy or 0.0) / 1000)
attrs[ATTR_TOTAL_CONSUMPTION_UNIT] = \
ATTR_TOTAL_CONSUMPTION_UNIT_VALUE
if self._device.has_temperature_sensor: