Modbus integration - Type problen

Hello All!

I would like to configure a modbus.yaml. The definition is this:
modbus:

  • name: ‘hub1’
    type: serial
    port: /dev/ttyUSB0
    baudrate: 9600
    bytesize: 8
    parity: N
    stopbits: 1
    timeout: 2

I linked the modbus.yaml in configuration.yaml. If I want to reload the configuration.yaml, the following error message I become:

Failed to reload configuration

‘type’

Do you have any ide, how to solve this?

Thanx :slight_smile:

Hi,

i think you have to remove the ’ in the name.

Example:

modbus:
  - name: hub1
    type: serial
    port: /dev/ttyUSB0
    baudrate: 9600
    bytesize: 8
    parity: N
    stopbits: 1
    timeout: 2

Thank you,. I removed the ‘ but the error message is the same :confused:

The log file contains the following:
File “/usr/src/homeassistant/homeassistant/components/modbus/validators.py”, line 283, in duplicate_modbus_validator
if hub[CONF_TYPE] == SERIAL:

do you have any ide, where should I make a correction?

Your configuration.yaml looks like that ?:

modbus: !include modbus.yaml

Then delete your first line in modbus.yaml with “modbus:”

1 Like