jan iversen
78a8ba99f9
Upgrade modbus to quality level "silver". ( #53186 )
2021-07-19 23:57:28 -05:00
jan iversen
19a282255b
Remove duplicate functions in modbus climate/sensor. ( #53141 )
...
Convert all data types correctly for climate.
2021-07-19 23:52:58 -05:00
jan iversen
78ef02f4d9
Allow pymodbus to reconnect in running system (not startup) ( #53020 )
...
Allow pymodbus to reconnect (not during startup).
2021-07-19 13:01:50 +02:00
jan iversen
c360d6009c
copy() --> deepcopy(). ( #52794 )
2021-07-14 11:00:16 +02:00
jan iversen
12ac666459
only allow one active call in each platform. ( #52823 )
2021-07-13 21:45:42 +02:00
Lincoln Kirchoff
ac39607ae9
Fix modbus climate precision configuration variable ( #52651 )
...
* Updated precision to follow the tenths, halves, whole notation used by
other home assistant climate modules. Added the precision @property so
that home assistant can handle this rounding in the frontend, rather
than in the _async_read_register() method.
* Fixed a pylinter error for periods in user-facing log messages, and
updated `precision` defaults in components/modbus/__init__.py to be
consistent with an error case, using `PRECISION_WHOLE`.
* revert changes to `precision:` configuration variable
instead, the climate `precision()` function will infer whether or not
to display in whole or tenths. halves will be unsupported, which should
be fine.
* re-added missing line that was removed
* revert change to use self._input_type instead of CALL_TYPE_REGISTER_HOLDING
2021-07-13 10:36:54 +02:00
jan iversen
646862ec96
Add array write to turn_on/off in modbus switch/fan/light ( #52582 )
2021-07-12 11:22:53 -07:00
jan iversen
5caf170c78
Correct Wrong "raise" in modbus validators. ( #52924 )
2021-07-12 11:06:31 -07:00
jan iversen
2ecfd74fa4
Add more data_types to modbus ( #52423 )
...
* Add more data_types.
* Use new struct when writing temperature.
2021-07-12 07:58:45 +02:00
jan iversen
fe1f7ba316
Add check for _client existence in modbus ( #52719 )
2021-07-08 11:58:51 +02:00
jan iversen
1cb298948f
Fix MODBUS connection type rtuovertcp does not connect ( #52505 )
...
* Correct host -> framer.
* Use function pointer
2021-07-05 11:45:50 +02:00
jan iversen
f1303e02ff
Let climate use base_struct_schema. ( #52154 )
2021-06-28 22:21:31 -07:00
jan iversen
c558c77413
Correct keyerror exception. ( #52150 )
2021-06-26 20:09:53 +02:00
jan iversen
1f4fdb50dc
Share struct validator between sensor and climate ( #51935 )
2021-06-23 11:03:17 -07:00
jan iversen
bc329cb602
Convert if/elif chains to dicts in modbus ( #51962 )
2021-06-18 11:20:44 +02:00
jan iversen
7ad91fdf71
Add swap to climate and change data_count -> count in modbus ( #51668 )
2021-06-16 12:11:23 +02:00
jan iversen
77f6d1f5cb
Do not return an exception in modbus ( #51829 )
2021-06-14 10:56:24 +02:00
jan iversen
2a51587bc3
Remove reverse_order (replaced by generic swap) ( #51665 )
...
Remove reverse_order (replaced by generic swap).
2021-06-11 11:41:41 +02:00
jan iversen
9e378d51af
Reduce modbus schemas and add delay to fan/light ( #51664 )
2021-06-11 09:22:47 +02:00
jan iversen
50001684aa
Add retries/retry_on_empty configuration parameters to Modbus ( #51412 )
...
* Add retries/retry_on_empty configuration parameters.
* Please review comment.
2021-06-06 09:13:50 +02:00
jan iversen
59b5f94569
Add fix delay after send/request to allow RS485 adapter to switch in modbus ( #51417 )
2021-06-05 14:41:32 +02:00
jan iversen
b8afb7dcfe
Check initial connect() worked in modbus ( #51470 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-06-05 14:39:09 +02:00
jan iversen
5e067c2631
Allow unlimited scan_interval in modbus ( #51471 )
...
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-06-04 18:06:44 +02:00
jan iversen
538a189168
Adjust modbus climate to use address/input_type ( #51202 )
2021-05-28 17:57:14 +02:00
jan iversen
00507539c1
Change Cover to use address/input_type ( #51154 )
...
* Change Cover to use address/input_type.
* Flake.
2021-05-28 13:23:44 +02:00
jan iversen
e45196f9c9
Remove "old" config from modbus binary_sensor ( #51117 )
2021-05-28 12:06:46 +02:00
jan iversen
5afd16ef5d
Move modbus schema validators to validators.py ( #51121 )
2021-05-28 11:38:31 +02:00
jan iversen
47f016b340
Remove old config from cover, including tests ( #51118 )
...
* Remove old config and standardize new config.
* Add missing safeguard.
2021-05-28 11:29:37 +02:00
jan iversen
8d365e8bf5
After merge, review. ( #51139 )
2021-05-27 08:28:31 +02:00
Yuriy Sannikov
6391d75919
Refactor ModbusRegisterSensor class to get hub and configuration ( #50234 )
...
* refactor ModbusRegisterSensor to match the ModbusSwitch interface
* Please pylint, mypy etc.
* Remove PLATFORM.
Co-authored-by: jan Iversen <jancasacondor@gmail.com>
2021-05-26 19:28:14 +02:00
tkdrob
028a07d86f
Wrap up selectors ( #50794 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-25 14:45:17 +02:00
jan iversen
8721675218
Use BaseSwitch class in modbus switch/fan/light ( #51031 )
2021-05-24 20:13:25 +02:00
jan iversen
c74e65ac2d
Streamline modbus test_init ( #50990 )
...
* Streamline test_init.
* Review comments.
* Remove hub name.
2021-05-24 14:53:54 +02:00
jan iversen
1546dbbf25
Add restore temperature to modbus climate ( #50963 )
...
* Add restore temperature to climate.
* please mypy.
* Review 2.
2021-05-24 14:03:44 +02:00
jan iversen
be13a73db8
Allow manual scan and add delay in switch verify. ( #50974 )
2021-05-24 12:59:55 +02:00
jan iversen
f55213d8b1
Update modbus cover to 100% coverage ( #50996 )
2021-05-23 10:18:35 -05:00
jan iversen
59ae78e5f0
Add restore_state to modbus binary_sensor ( #50922 )
...
* Add restore_state to binary_sensor.
* Update return value in State.
2021-05-22 13:38:05 +02:00
Vladimír Záhradník
c979101a02
Add Modbus fan integration ( #48558 )
...
* Add Modbus fan entity
* Update to PR.
* Pylint.
Co-authored-by: jan Iversen <jancasacondor@gmail.com>
2021-05-21 09:56:47 +02:00
Vladimír Záhradník
80d172140f
Add Modbus light integration ( #42120 )
...
* Add Modbus Light and add unit tests
* Update to original PR.
* Review comments.
* Review 2.
Co-authored-by: jan Iversen <jancasacondor@gmail.com>
2021-05-21 08:57:17 +02:00
jan iversen
c650deef98
Add base class for all modbus platforms ( #50878 )
...
* Add base for all platforms.
* Please pylint.
2021-05-20 16:56:11 +02:00
Maciej Bieniek
e06a2a53c4
Add constructor return type in integrations L-N ( #50888 )
...
* Add constructor return type in integrations L-N
* Small fix
2021-05-20 13:06:44 +01:00
jan iversen
b7fc537cd5
Remove non pymodbus_call from modbus.py. ( #50813 )
2021-05-19 11:39:53 +02:00
jan iversen
4c7fcae536
Small bug fixes in modbus due to async ( #50812 )
...
* Small bug fixes due to async.
* _available is true in turn_on/turn_off
* Remove double update.
* Set _available.
2021-05-19 10:13:48 +02:00
jan iversen
ba827db8ec
Update remaining modbus platforms to use pymodbus_call ( #50768 )
2021-05-17 22:12:18 +02:00
jan iversen
6b34ba012c
Fix missing await in modbus platforms (followup on async PR) ( #50710 )
2021-05-17 14:20:51 +02:00
nikito7
0fac3ccebc
Change Modbus error message to bytes ( #50725 )
2021-05-17 14:12:17 +02:00
jan iversen
ff856a9bba
Simplify calls to pymodbus ( #50717 )
...
* simplify pymodbus_call.
Do not call with a function object and a check attribute, call instead
with CALL_TYPE*.
Avoid if <type> call x else call y.
Call async_pymodbus_call directly, instead of unpacking/packing.
* Declare call type in __init__.
* Modbus.py back to 100% test coverage.
2021-05-17 11:20:12 +02:00
jan iversen
224cc779c4
Correct Modbus platform cover restore state ( #50421 )
...
* Correct cover restore state.
* Change mock usage.
* Add states to convert.
2021-05-16 08:40:19 +02:00
jan iversen
ad7be91b6a
Fix modbus blocking threads ( #50619 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-15 19:54:17 +02:00
tkdrob
a9660d5788
Add targets and selectors for services (L-M) ( #50543 )
2021-05-15 11:06:34 +02:00