diff --git a/homeassistant/components/modbus/modbus.py b/homeassistant/components/modbus/modbus.py index 35572baff43..2e5892dbf1d 100644 --- a/homeassistant/components/modbus/modbus.py +++ b/homeassistant/components/modbus/modbus.py @@ -5,6 +5,7 @@ import logging from pymodbus.client.sync import ModbusSerialClient, ModbusTcpClient, ModbusUdpClient from pymodbus.constants import Defaults from pymodbus.exceptions import ModbusException +from pymodbus.transaction import ModbusRtuFramer from homeassistant.const import ( CONF_DELAY, @@ -224,7 +225,7 @@ class ModbusHub: # network configuration self._pb_params["host"] = client_config[CONF_HOST] if self._config_type == CONF_RTUOVERTCP: - self._pb_params["host"] = "ModbusRtuFramer" + self._pb_params["framer"] = ModbusRtuFramer Defaults.Timeout = client_config[CONF_TIMEOUT]