mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
parent
64c2340fab
commit
05c1aff0f6
@ -2,7 +2,7 @@
|
||||
"domain": "modbus",
|
||||
"name": "Modbus",
|
||||
"documentation": "https://www.home-assistant.io/integrations/modbus",
|
||||
"requirements": ["pymodbus==2.5.3"],
|
||||
"requirements": ["pymodbus==3.1.0"],
|
||||
"codeowners": ["@adamchengtkc", "@janiversen", "@vzahradnik"],
|
||||
"quality_scale": "gold",
|
||||
"iot_class": "local_polling",
|
||||
|
@ -7,8 +7,8 @@ from collections.abc import Callable
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from pymodbus.client.sync import (
|
||||
BaseModbusClient,
|
||||
from pymodbus.client import (
|
||||
ModbusBaseClient,
|
||||
ModbusSerialClient,
|
||||
ModbusTcpClient,
|
||||
ModbusUdpClient,
|
||||
@ -255,7 +255,7 @@ class ModbusHub:
|
||||
"""Initialize the Modbus hub."""
|
||||
|
||||
# generic configuration
|
||||
self._client: BaseModbusClient | None = None
|
||||
self._client: ModbusBaseClient | None = None
|
||||
self._async_cancel_listener: Callable[[], None] | None = None
|
||||
self._in_error = False
|
||||
self._lock = asyncio.Lock()
|
||||
@ -380,7 +380,7 @@ class ModbusHub:
|
||||
self, unit: int | None, address: int, value: int | list[int], use_call: str
|
||||
) -> ModbusResponse:
|
||||
"""Call sync. pymodbus."""
|
||||
kwargs = {"unit": unit} if unit else {}
|
||||
kwargs = {"slave": unit} if unit else {}
|
||||
entry = self._pb_call[use_call]
|
||||
try:
|
||||
result = entry.func(address, value, **kwargs)
|
||||
|
@ -1774,7 +1774,7 @@ pymitv==1.4.3
|
||||
pymochad==0.2.0
|
||||
|
||||
# homeassistant.components.modbus
|
||||
pymodbus==2.5.3
|
||||
pymodbus==3.1.0
|
||||
|
||||
# homeassistant.components.monoprice
|
||||
pymonoprice==0.4
|
||||
|
@ -1272,7 +1272,7 @@ pymeteoclimatic==0.0.6
|
||||
pymochad==0.2.0
|
||||
|
||||
# homeassistant.components.modbus
|
||||
pymodbus==2.5.3
|
||||
pymodbus==3.1.0
|
||||
|
||||
# homeassistant.components.monoprice
|
||||
pymonoprice==0.4
|
||||
|
Loading…
x
Reference in New Issue
Block a user