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 2017-03-19 21:02:11 +00:00 committed by Pascal Vizeli
parent 970bde9e99
commit acf75b5253
12 changed files with 50 additions and 49 deletions

View file

@ -34,7 +34,7 @@ CONF_LIGHTS = 'lights'
VERA_ID_FORMAT = '{}_{}'
ATTR_CURRENT_POWER_MWH = "current_power_mwh"
ATTR_CURRENT_POWER_W = "current_power_w"
VERA_DEVICES = defaultdict(list)
@ -179,7 +179,7 @@ class VeraDevice(Entity):
power = self.vera_device.power
if power:
attr[ATTR_CURRENT_POWER_MWH] = convert(power, float, 0.0) * 1000
attr[ATTR_CURRENT_POWER_W] = convert(power, float, 0.0)
attr['Vera Device Id'] = self.vera_device.vera_device_id