Slider modbus write issue, after change value on slider it is not send to device

I have a problem to find a way to send value from slider to modbus, I did it like:

    sensors:
    - name: "speedmanual"
      scan_interval: 1
      data_type: int16
      unit_of_measurement: '%'
      slave: 10
      address: 4210
      input_type: holding

there is also one input_number manual_speed to do slider from.

type: entities
entities:
  - entity: input_number.manual_speed
state_color: false
trigger:
  platform: state
  entity_id: input_number.manual_speed
  action: call-service
  service: modbus.write_register
  service_data:
    hub: reku
    unit: 10
    address: 4210
    value: '{{ states(input_number.manual_speed) | int16 }}'

I have tried it also with manual value like:
value: 10

The same with button is working like that:

  - type: button
    tap_action:
      action: call-service
      service: modbus.write_register
      service_data:
        hub: reku
        unit: 10
        address: 4210
        value: 10
      target: {}
    entity: input_boolean.test
    show_icon: false
    name: 10%

Why slider is not workig with the same code ?

Did you solve this?

Not, I use way around with 10 buttons and with 10% steps on it instead.

1 Like