Modbus to Home Assistant (help)

Hello,

I’m trying to start my first project with Modbus and I can’t get past step 0…
My intention is to use this type of POE equipment, to read the inverter, the boiler… and integrate it into HA.

But as soon as I start coding, HA gives me errors, and I don’t know what I’m doing wrong.

Example:

Files:
image

image

The result:

Why? What am I doing wrong?

Thank you!

You need to keep spaces with !include

#modbus:
#2
  - name: ...

tcp don’t use baudrate and stop bits

You need to check the documentation here:

If you are using serial, type should be serial and then it’s not baud_rate but baudrate. Same for stopbits. Also, parity, method and bytesize are mandatory as per the error message and the documentation

Thank you very much. It’s working already.

Now I have a doubt with entities. I’ve already read a lot of info using Sensors and Swithes. But hoy can I R/W a number?

The idea is to have something like this:

But I can’t make this kind of “number.” in Modbus…

Thank you very much!

I have reduce the code to explain it easier.

Why TEST3 doesn’t work?

image

This is the same, write for ESPHome with modbus_controler. But I need to use only Modbus, my problem is that I can’t find something similar to “number” entity.:

Thank you very much!