[switch.wemo] Fix mW to kW conversion. (#6826)

* Fix mW to kW conversion.

* Line length.
pull/6830/head
Lewis Juggins 2017-03-28 16:24:33 +01:00 committed by Pascal Vizeli
parent 5c80da6a8f
commit 6dba05c79f
1 changed files with 2 additions and 1 deletions

View File

@ -148,7 +148,8 @@ class WemoSwitch(SwitchDevice):
def today_energy_kwh(self):
"""Today total energy usage in kWh."""
if self.insight_params:
return convert(self.insight_params['todaymw'], float, 0.0) / 1000.0
miliwatts = convert(self.insight_params['todaymw'], float, 0.0)
return miliwatts / 1000000.0
@property
def detail_state(self):