Modbus host IP address from input_text entry

Hi

I am trying to allow the user to change the IP address of the modbus using an input_text box. If I write the static IP address in manually all works well so I am fairly sure the modbus devices is setup correctly. However, the below code doesnt work and I am a bit confused

  - type: tcp
   # host: 192.168.86.246
    host: "{{ states('input_text.victron_ip') }}"
    port: 502
    name: victron

I have the input box with “192.168.86.246” (with the “”) although with and without give the same result

Any help would be really appreciated

cheers

Not possible.

Use some script to edit yaml, and call service modbus.restart

ahh ok, thanks for the heads up. Is there anything I can lookup re a script to edit the yaml - not done that before

I also like the idea of modbus.restart - nice :slight_smile: