Skip to content

Commit

Permalink
Update schneider_modbus.py
Browse files Browse the repository at this point in the history
Fix: use named parameters to prevent fatal error on HA 2025.1.1
  • Loading branch information
erwin314 authored and Breina committed Jan 10, 2025
1 parent 285c76f commit f43b249
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/powertag_gateway/schneider_modbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class TypeOfGateway(enum.Enum):
class SchneiderModbus:
def __init__(self, host, type_of_gateway: TypeOfGateway, port=502, timeout=5):
_LOGGER.info(f"Connecting Modbus TCP to {host}:{port}")
self.client = ModbusTcpClient(host, port, timeout=timeout)
self.client = ModbusTcpClient(host=host, port=port, timeout=timeout)
self.client.connect()
self.type_of_gateway = type_of_gateway
if type_of_gateway is TypeOfGateway.POWERTAG_LINK:
Expand Down

0 comments on commit f43b249

Please sign in to comment.