Modbus reading humidity (Unsigned 16 bit integer)

Dear all,

I would like to ask your help in order to find a solution for the following:
I need to read humidity value via Modbus from my Uponor heating controller.
According to the documentation is it: Unsigned 16 bit integer

I use the following code to reading multiple registers:

    # Uponor 1  
    # reading all re```gisters for humidity
    - name: heating_u1_ch1_12_hum
      slave: 1
      address: 13
      input_type: input
      count: 12
      precision: 0
      data_type: custom
      structure: ">12H"
      state_class: measurement
      scan_interval: 20

than I use the following to get the data:
for 1st value : {{states('sensor.heating_u1_ch1_12_hum').split(',')[0]}}
for 2nd value: {{states('sensor.heating_u1_ch1_12_hum').split(',')[1]}}

the problem that I get values 38435 and 46882 correspondingly insted or real XXs.

What is the right way to convert the data that I read to “unsigned int 16”?
Thank you.

well… quite strange. If I take only 8 bit unsigned … than I see the correct values i.e. 32% and 34%.

    - name: heating_u1_ch1_12_hum
      slave: 1
      address: 13
      input_type: input
      count: 12
      precision: 0
      data_type: custom
      structure: ">xBxBxBxBxBxBxBxBxBxBxBxB"
      state_class: measurement
      scan_interval: 20

may be devices send data (humidity) in diff. format?