Modbus, sensor reading without lambda

I’m trying to read values from the device over modbus, with esphome.
From debug i have

[16:35:01][I][:057]: Lambda incoming value=10752.000000 - data array size is 2
[16:35:01][I][:058]: Sensor properties: adress = 0xB4C, offset = 0x0 value type=3
[16:35:01][I][:061]: data[0]=0x00 (42)
[16:35:01][I][:061]: data[0]=0x3FF00000 (0)
[16:35:01][I][:065]: Sensor value: = 42

How to get data from sensor?

sensor:
  - platform: modbus_controller
    modbus_controller_id: Heater
    name: "External temp"
    id: temperature_outside
    register_type: holding
    address: 0x0b4c
    device_class: temperature
    value_type: S_WORD
    unit_of_measurement: "°C"
    accuracy_decimals: 1
    filters:
      - multiply: 0.1

result = 1075,2

is it possible to get this data without lambda?

Byte swap

10752 = 2A00

002A = 42

You haven’t posted any lambda. Post your complete yaml for best support…

now i’m using lambda like that

   lambda: |-
        int value = data[1] << 8 |  data[0];
        return value ;

I’m just wounering if it’s possible to do it without lambda

try U_WORD

I don’t believe so, why anyway?

ok go it, last thing.
I’m getting value of the sensor

  - platform: modbus_controller
    modbus_controller_id: mbd
    name: "temp comfort boiler"
    id: temperature_boil_komfort
    register_type: holding
    address: 0x0b67
    value_type: U_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    accuracy_decimals: 1
    filters:
      - multiply: 0.1
    lambda: |-
        int value = data[3] << 8 |  data[2];
        return value ; 

I’m trying to change temp with command

select:
  - platform: modbus_controller
    id: onoffsel1
    name: "Temp comfort boiler set"
    address: 0x0b67
    value_type: U_WORD
    entity_category: config
    icon: "mdi:toggle-switch"
    optionsmap:
      "45": 45
      "46": 46

But when i set value
46 - temp is set 1177,6
45 - temp is set 1152

Any idea?

It would be more productive if you post a link to your devices modbus protocol.

unfortunatley, vendor don’t wan’t to share that information, so everything is reverse engineering

So what are you getting out from modbus sensor with U-WORD without that lambda?
Maybe it’s FP32 from two registers? Or something else…
What you know about those registers after reverse engineering?