Let nibe library autodetect word swap on config (#161786)

This commit is contained in:
Joakim Plate
2026-01-28 19:42:36 +01:00
committed by GitHub
parent b52dd5fc05
commit fc330ce165

View File

@@ -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: