[switch.wemo] Fix mW to kW conversion. (#6826)
* Fix mW to kW conversion. * Line length.pull/6830/head
parent
5c80da6a8f
commit
6dba05c79f
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue