mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57:10 +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):
|
def today_energy_kwh(self):
|
||||||
"""Today total energy usage in kWh."""
|
"""Today total energy usage in kWh."""
|
||||||
if self.insight_params:
|
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
|
@property
|
||||||
def detail_state(self):
|
def detail_state(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user