def test_to_knx_uninitialized(self):
        """Test to_knx raising ConversionError."""
        xknx = XKNX()
        remote_value = RemoteValueSetpointShift(xknx=xknx)

        assert remote_value.dpt_class is None
        with pytest.raises(ConversionError):
            remote_value.to_knx(1)
 def test_to_knx_dpt_9(self):
     """Test to_knx returning DPT 9.002 payload."""
     xknx = XKNX()
     remote_value = RemoteValueSetpointShift(
         xknx=xknx, setpoint_shift_mode=SetpointShiftMode.DPT9002
     )
     assert remote_value.to_knx(1) == DPTArray((0x00, 0x64))
 def test_to_knx_dpt_6(self):
     """Test to_knx returning DPT 6.010 payload."""
     xknx = XKNX()
     remote_value = RemoteValueSetpointShift(
         xknx=xknx, setpoint_shift_mode=SetpointShiftMode.DPT6010)
     assert remote_value.setpoint_shift_step == 0.1
     assert remote_value.to_knx(1) == DPTArray((10, ))