Modbus configuration error. KeyError: delay

Hello,

I am testing deepply Modbus integration.

TCP integration works well.

I am now with “serial” and i am getting an error in the configuration:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 170, in _async_setup_component
hass, processed_config
File “/config/custom_components/modbus/init.py”, line 102, in async_setup
hub_collect[client_config[CONF_NAME]] = ModbusHub(client_config, hass.loop)
File “/config/custom_components/modbus/init.py”, line 174, in init
self._config_delay = client_config[CONF_DELAY]
KeyError: ‘delay’

Any clue?

This is my configuration

modbus:
  name: hub1
  type: serial
  method: rtu
  port: /dev/ttyUSB0
  baudrate: 9600
  stopbits: 1
  bytesize: 8
  parity: N

Thanks a lot.
Marcos.

Looks like it was updated 5 days ago…but the documentation hasn’t been updated.

It was added with this change

Delay was added to ethernet config, but not to serial. But, the ModBusHub expects it.

So it’s a bug.

Go ahead and open an issue for it!

Thanks for the reply @jocnnor.

I tried to modify the init file adding delay to SERIAL validation but later i get other error in the pymodbus related to asyncio so I guess I am using 1.5.2 pymodbus. In the meantime I will upgrade pymodbus and continue testing.

I am new in HA. How should I open an issue?

Thanks.