mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Add temporary fix to modbus to solve upstream problem (#53857)
This commit is contained in:
parent
a8e4482594
commit
b2fffdd13e
@ -60,7 +60,11 @@ class BasePlatform(Entity):
|
|||||||
def __init__(self, hub: ModbusHub, entry: dict[str, Any]) -> None:
|
def __init__(self, hub: ModbusHub, entry: dict[str, Any]) -> None:
|
||||||
"""Initialize the Modbus binary sensor."""
|
"""Initialize the Modbus binary sensor."""
|
||||||
self._hub = hub
|
self._hub = hub
|
||||||
self._slave = entry.get(CONF_SLAVE)
|
# temporary fix,
|
||||||
|
# make sure slave is always defined to avoid an error in pymodbus
|
||||||
|
# attr(in_waiting) not defined.
|
||||||
|
# see issue #657 and PR #660 in riptideio/pymodbus
|
||||||
|
self._slave = entry.get(CONF_SLAVE, 0)
|
||||||
self._address = int(entry[CONF_ADDRESS])
|
self._address = int(entry[CONF_ADDRESS])
|
||||||
self._input_type = entry[CONF_INPUT_TYPE]
|
self._input_type = entry[CONF_INPUT_TYPE]
|
||||||
self._value = None
|
self._value = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user