File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -347,17 +347,17 @@ def __init__(
347347 async def connect (self ) -> bool :
348348 """Connect to Plugwise device and determine its name, type and version."""
349349 result = await self ._request (DOMAIN_OBJECTS )
350- vendor_names : list [etree ] = result .findall ("./module/vendor_name" )
351- vendor_models : list [etree ] = result .findall ("./module/vendor_model" )
352350 # Work-around for Stretch fv 2.7.18
353- if not vendor_names :
351+ if not ( vendor_names := result . findall ( "./module/vendor_name" )) :
354352 result = await self ._request (MODULES )
355353 vendor_names = result .findall ("./module/vendor_name" )
356354
357355 names : list [str ] = []
358- models : list [str ] = []
359356 for name in vendor_names :
360357 names .append (name .text )
358+
359+ vendor_models = result .findall ("./module/vendor_model" )
360+ models : list [str ] = []
361361 for model in vendor_models :
362362 models .append (model .text )
363363
You can’t perform that action at this time.
0 commit comments