Modbus switch stopped working after update

Hi, I have updated to

  • Core 2025.2.5
  • Supervisor 2025.02.4
  • Operating System 14.2
  • Frontend 20250221.0

I have some default modbus switch configured like this:

    switches: 
      - name: "DDS238-2 ZN-SR Relay 1"
        write_type: holdings 
        address: 26
        unique_id: dds238-2_zn_sr_relay   

This used to work fine (up and including version 2025.2.1)

Now I get this error:
“Action switch/turn_on can not be completed, object of type ‘int’ has no len()”

But everything is “default” as stated in the docs. I read somewhere something has changed in pymodbus. But as command_on/of are default (1, 0) shouldn’t everything keep working ?

So what needs to be done to get it working again ?

Thanks

I should mention, to be complete the switch button configuration:

type: entity
entity: switch.dds238_2_zn_sr_relay
icon: mdi:toggle-switch-outline
state_color: true

Things I would try:
Set the slave id, set the on/off commands, write_type: holdings without the s.
If not check if you can controll it over actions

Thanks for you reply. The holdings type is needed because the device doesn’t understand writing to a single register.

Anyways, since the update to 2025.3 everything works as before again.
Great !