core/homeassistant/components/modbus
jan iversen f8f8dddca7
Fix modbus sync/async issues (#34043)
* add pyserial to manifest

pymodbus is very developer oriented and assumes every developer
adapt the requierements.txt to his/hers needs.

Our requirements.txt is different it contains all posibilities allowing
user to later change configuration without having to install extra
packages.

As a consequence manifest.json needs to include the pyserial.

* modbus: make truly async client creation

Make hass call listen_once async.
Integrate content of start_modbus into async_setup.

Do not use the boiler plate create tcp client function from
pymodbus as it is sync, and also does not work well with asyncio,
instead call the init_<type> directly, since that is async.

* both component/modbus and component/serial uses pyserial-async
but with slighty different version requirements.

Combined the 2.

* Review 1

* Review 2

* Review

@staticmethod is no good, because the function uses class variables.

* Review

Pytest is sometimes a bit cryptic, lets hope this does it.
2020-04-12 19:55:03 +02:00
..
__init__.py Fix modbus sync/async issues (#34043) 2020-04-12 19:55:03 +02:00
binary_sensor.py Fix Modbus review comments (#33755) 2020-04-07 16:56:48 +02:00
climate.py Fix Modbus review comments (#33755) 2020-04-07 16:56:48 +02:00
const.py Modbus patch, to allow communication with "slow" equipment using tcp (#32557) 2020-03-29 12:39:30 -05:00
manifest.json Fix modbus sync/async issues (#34043) 2020-04-12 19:55:03 +02:00
sensor.py Fix Modbus review comments (#33755) 2020-04-07 16:56:48 +02:00
services.yaml Add prettier (in pre-commit and CI) (#33693) 2020-04-05 17:27:16 +02:00
switch.py Fix Modbus review comments (#33755) 2020-04-07 16:56:48 +02:00