コード例 #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)
コード例 #2
0
ファイル: remote_value_step_test.py プロジェクト: XKNX/xknx
 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