Skip to content

Commit

Permalink
added support for mgw lan
Browse files Browse the repository at this point in the history
  • Loading branch information
grimmpp committed May 23, 2024
1 parent d96961f commit 4137154
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/eltako/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async def manual_selection_routine(self, user_input=None, manual_setp:bool=False
if len(g_list) == 0:
errors = {CONF_GATEWAY_DESCRIPTION: ERROR_NO_GATEWAY_CONFIGURATION_AVAILABLE}

# add serial paths from configuration
# add manually added serial paths and ip addresses from configuration
for g_id in g_list_dict.keys():
g_c = config_helpers.find_gateway_config_by_id(config, g_id)
if CONF_SERIAL_PATH in g_c:
Expand Down Expand Up @@ -118,7 +118,7 @@ async def validate_eltako_conf(self, user_input) -> bool:
gateway_selection: str = user_input[CONF_GATEWAY_DESCRIPTION]

for gdc in gateway.GatewayDeviceType:
if gdc in gateway_selection and gdc in gateway.BAUD_RATE_DEVICE_TYPE_MAPPING:
if gdc in gateway_selection:
baud_rate = gateway.BAUD_RATE_DEVICE_TYPE_MAPPING[gdc]
break

Expand Down
1 change: 1 addition & 0 deletions custom_components/eltako/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,5 @@ def is_lan_gateway(cls, dev_type) -> bool:
GatewayDeviceType.EltakoFAMUSB: 9600,
GatewayDeviceType.USB300: 57600,
GatewayDeviceType.ESP3: 57600,
GatewayDeviceType.LAN: -1,
}

0 comments on commit 4137154

Please sign in to comment.