Example #1
0
 def test_from_knx_invert(self):
     """Test from_knx function with normal operation."""
     xknx = XKNX()
     remote_value = RemoteValueStep(xknx, invert=True)
     self.assertEqual(remote_value.from_knx(DPTBinary(1)),
                      RemoteValueStep.Direction.DECREASE)
     self.assertEqual(remote_value.from_knx(DPTBinary(0)),
                      RemoteValueStep.Direction.INCREASE)
Example #2
0
 def test_from_knx(self):
     """Test from_knx function with normal operation."""
     xknx = XKNX()
     remote_value = RemoteValueStep(xknx)
     assert remote_value.from_knx(
         DPTBinary(1)) == RemoteValueStep.Direction.INCREASE
     assert remote_value.from_knx(
         DPTBinary(0)) == RemoteValueStep.Direction.DECREASE