Convert TOF distance sensor little-endian hex string to decimal

Is it possible to read the hex serial data stream from a Waveshare TOF distance sensor, extract values from the hex string, restore to hex data and convert to decimal, with just a template sensor?
Example:

  • TOF serial data hex stream output: 57 00 ff 00 b3 5d 49 00 ec 06 00 01 64 00 ff 05
  • Distance fields: ec 06 00
  • little-endian conversion: 0006ec
  • decimal conversion: 1772

TOF sensor is connected to a ftdi and serial data are read by an RPI serial port (checked with a TOF10120 sensor, that only transmits the distance value in decimal and works)