Add test for extended data in setup for solarlog (#129345)

pull/127267/head^2
dontinelli 2024-10-29 13:07:48 +01:00 committed by GitHub
parent bd13dbdad0
commit a528d62c16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -65,7 +65,8 @@ class SolarLogCoordinator(DataUpdateCoordinator[SolarlogData]):
_LOGGER.debug("Start async_setup") _LOGGER.debug("Start async_setup")
logged_in = False logged_in = False
if self.solarlog.password != "": if self.solarlog.password != "":
logged_in = await self.renew_authentication() if logged_in := await self.renew_authentication():
await self.solarlog.test_extended_data_available()
if logged_in or await self.solarlog.test_extended_data_available(): if logged_in or await self.solarlog.test_extended_data_available():
device_list = await self.solarlog.update_device_list() device_list = await self.solarlog.update_device_list()
self.solarlog.set_enabled_devices({key: True for key in device_list}) self.solarlog.set_enabled_devices({key: True for key in device_list})