Address late review for bsblan (#99360)

* Address late review comment

* Break also comment
pull/99379/head
Jan-Philipp Benecke 2023-08-31 07:31:05 +02:00 committed by GitHub
parent 343e8f0ecc
commit 70843862aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -35,7 +35,8 @@ class BSBLanUpdateCoordinator(DataUpdateCoordinator[State]):
LOGGER,
name=f"{DOMAIN}_{config_entry.data[CONF_HOST]}",
# use the default scan interval and add a random number of seconds to avoid timeouts when
# the BSB-Lan device is already/still busy retrieving data, e.g. for MQTT or internal logging.
# the BSB-Lan device is already/still busy retrieving data,
# e.g. for MQTT or internal logging.
update_interval=SCAN_INTERVAL + timedelta(seconds=randint(1, 8)),
)
@ -50,5 +51,6 @@ class BSBLanUpdateCoordinator(DataUpdateCoordinator[State]):
return await self.client.state()
except BSBLANConnectionError as err:
raise UpdateFailed(
f"Error while establishing connection with BSB-Lan device at {self.config_entry.data[CONF_HOST]}"
f"Error while establishing connection with "
f"BSB-Lan device at {self.config_entry.data[CONF_HOST]}"
) from err