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:
1 parent
970bde9e99
commit
acf75b5253
12 files changed
+50
-49
No files matched your search
@@ -94,15 +94,15 @@ class TestMfiSwitch(unittest.TestCase):
|
||||
self.assertEqual(self.port.control.call_args, mock.call(False))
|
||||
self.assertFalse(self.switch._target_state)
|
||||
|
||||
def test_current_power_mwh(self):
|
||||
def test_current_power_w(self):
|
||||
"""Test current power."""
|
||||
self.port.data = {'active_pwr': 1}
|
||||
self.assertEqual(1000, self.switch.current_power_mwh)
|
||||
self.port.data = {'active_pwr': 10}
|
||||
self.assertEqual(10, self.switch.current_power_w)
|
||||
|
||||
def test_current_power_mwh_no_data(self):
|
||||
def test_current_power_w_no_data(self):
|
||||
"""Test current power if there is no data."""
|
||||
self.port.data = {'notpower': 123}
|
||||
self.assertEqual(0, self.switch.current_power_mwh)
|
||||
self.assertEqual(0, self.switch.current_power_w)
|
||||
|
||||
def test_device_state_attributes(self):
|
||||
"""Test the state attributes."""
|
||||
|
||||
Reference in new issue
Block a user