Revise power and energy units and property names. (#6212)

* Revise power and energy units and property names.

* Add change for new wemo parameter.
This commit is contained in:
Greg Dowling authored and Pascal Vizeli committed 2017-03-19 22:02:11 +01:00
1 parent 970bde9e99
commit acf75b5253
12 files changed
+50 -49

No files matched your search

+3 -3
View File
@@ -111,9 +111,9 @@ class MfiSwitch(SwitchDevice):
self._target_state = False
@property
def current_power_mwh(self):
"""Return the current power usage in mWh."""
return int(self._port.data.get('active_pwr', 0) * 1000)
def current_power_w(self):
"""Return the current power usage in W."""
return int(self._port.data.get('active_pwr', 0))
@property
def device_state_attributes(self):