Correct missing wordswap for S series nibe (#89866)

Correct missing wordswap for nibe
This commit is contained in:
Joakim Plate 2023-03-20 12:08:27 +01:00 committed by GitHub
parent 146a31163c
commit 9f1e170851
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,13 +62,13 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up Nibe Heat Pump from a config entry."""
heatpump = HeatPump(Model[entry.data[CONF_MODEL]])
heatpump.word_swap = entry.data.get(CONF_WORD_SWAP, True)
await heatpump.initialize()
connection: Connection
connection_type = entry.data[CONF_CONNECTION_TYPE]
if connection_type == CONF_CONNECTION_TYPE_NIBEGW:
heatpump.word_swap = entry.data[CONF_WORD_SWAP]
connection = NibeGW(
heatpump,
entry.data[CONF_IP_ADDRESS],