mirror of
https://github.com/home-assistant/core.git
synced 2025-07-07 21:37:07 +00:00
[switch.wemo] Fix mW to kW conversion. (#6826)
* Fix mW to kW conversion. * Line length.
This commit is contained in:
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…
x
Reference in New Issue
Block a user