Sensor SCAN_INTERVAL and Throttle

Hello,
this post is related to https://community.home-assistant.io/t/detect-faulty-sensor/28842/8

I’m working to improve modbus sensor component.
My focus is to fix some issues related to sensors conneted via RS485 bus.

First step: SCAN_INTERVAL.

Now modbus sensors have a fixed scan interval of 30 seconds. If I hardcode a diffrenet interval in sersor/modbus.py adding SCAN_INTERVAL = timedelta(seconds=5) before the class declaration I get a 5 seconds interval between updates fon all sensors. I can’t understand how to apply it in setup_platfom. I can have some sensors that can be updated an default scan interval, but other that need a short interval.

Second step: MIN_TIME_BETWEEN_UPDATE

Some USB to RS485 converters, and some RS232 to RS485 converters, take some time to switch from TX to RX, and vice versa. RS485 bus is half duplex. The standard way to handle this issue is to place a little delay, 10/50ms, between the slave response and the next query from master. This delay is generally configurable in master station because many factors could influence this time, a slow response of interface or a slave that take long time to switch to RX mode.
I need to change something in modbus master implementation in HA (components/modbus.by).
I placed @Throttle decorator before def read_coils and def read_holding_registers but I can’t see any delay between two requests.

What I’m doing of wrong?
I’ve just started to study HA architecture, so some interactons between components are not completly clear for me.

Scan interval is solved here: https://github.com/home-assistant/home-assistant/issues/9047

For other issue I still investigate.