Modbus Switch Configuration

Hello Community,

i have a modbus switch topic. :slight_smile:

This is how my switch is configured:

switches:
  - name: "NameOfSwitch"
    unique_id: "UniqueIdSwitch"
    slave: 255
    address: 5608
    write_type: coil
    command_on: 1
    command_off: 0
    scan_interval: 1
    verify:

This Code is working as expected.
But i want to invert on / off

For that i tried:

switches:
  - name: "NameOfSwitch"
    unique_id: "UniqueIdSwitch"
    slave: 255
    address: 5608
    write_type: coil
    command_on: 0
    command_off: 1
    scan_interval: 1
    verify:

is not working

then i tried this:

switches:
  - name: "NameOfSwitch"
    unique_id: "UniqueIdSwitch"
    slave: 255
    address: 5608
    write_type: coil
    command_on: 1
    command_off: 0
    scan_interval: 1
    verify:
      input_type: coil
      address: 5608
      state_on: 0 # Inverted state verification
      state_off: 1

but this is also not working as expected.

My Goal is that in PLC the switch is off and on in HA

Many Thanks for your help