mirror of
https://github.com/Electric-Special/ha-core.git
synced 2026-03-21 03:03:17 +01:00
Let nibe library autodetect word swap on config (#161786)
This commit is contained in:
@@ -96,7 +96,6 @@ async def validate_nibegw_input(
|
||||
"""Validate the user input allows us to connect."""
|
||||
|
||||
heatpump = HeatPump(Model[data[CONF_MODEL]])
|
||||
heatpump.word_swap = True
|
||||
await heatpump.initialize()
|
||||
|
||||
connection = NibeGW(
|
||||
@@ -114,6 +113,9 @@ async def validate_nibegw_input(
|
||||
"Address already in use", "listening_port", "address_in_use"
|
||||
) from exception
|
||||
|
||||
if heatpump.word_swap is None:
|
||||
heatpump.word_swap = True
|
||||
|
||||
try:
|
||||
await connection.verify_connectivity()
|
||||
except (ReadSendException, CoilWriteSendException) as exception:
|
||||
|
||||
Reference in New Issue
Block a user