How to Associate Modbus Entity with a Home Assistant Device

I have the modbus integration working over TCP.

The “sensor” defined in the configuration.yaml file does expose a useable “entity”.
The data is properly being queried and its history stored/displayed properly.

However, where would one define the association of this working “entity” with a parent “device” ? Is not that what the yaml property of - name supposed to define?

When looking for “Devices”, I do not see a device name ESP32-1.

configuration.yaml section:

modbus:
  - name: ESP32-1
    type: tcp
    host: 192.168.1.14
    port: 502
    sensors:
      - name: AC-Voltage
        input_type: holding
        unit_of_measurement: Volts
        data_type: uint16
        slave: 1
        address: 0
        unique_id: AC_Voltage_ESP32-1
        scale: .01
        offset: 0

Also related:

The “Developer Tools/YAML configuration reloading” sub-feature does NOT appear to work for any changes I make to the “modbus:” section of the configuration.yaml file.

I have to do a “full” RESTART of the Home Assistant platform for any modbus-section changes to be recognized.

Thanks for the help.

Here is a snippit my modbus. I put it in a seperate file modbus.yaml and yes I have to restart HA to see changes.

# Example configuration.yaml entry for multiple TCP connections
  - name: hub1
    type: tcp
    host: 192.168.1.11
    port: 502
    sensors:
      - name: Modbus_Voltage_A
        slave: 1
        address: 0
        input_type: holding
        unit_of_measurement: V
        device_class: voltage
        state_class: measurement
        count: 1
        scale: 0.01
        offset: 0
        precision: 1
        data_type: uint16
        scan_interval: 6

The name hub1 is arbitrary as is the name Modbus_Voltage_A name. But yes hub1 does not appear in tthe list. See screen dump of this variable.

image

Thanks for the reply, but I’m not sure how this relates to the creation of a parent “device” which would contain all of the working “entities” (as a “container”).

Are you just confirming that my observation of the:

modbus:
  - name: ESP32-1

also DOES NOT work for you?

I would have imagined that EPS32-1 should have been a new "device" name...