@@ -382,26 +382,24 @@ async def device_test(self, smile=pw_smile.Smile, testdata=None):
382382 await smile ._full_update_device ()
383383 smile .get_all_devices ()
384384 data = await smile .async_update ()
385- extra = data .gateway
386- device_list = data .devices
387385
388- if "heater_id" in extra :
389- self .cooling_present = extra ["cooling_present" ]
390- self .notifications = extra ["notifications" ]
386+ if "heater_id" in data . gateway :
387+ self .cooling_present = data . gateway ["cooling_present" ]
388+ self .notifications = data . gateway ["notifications" ]
391389 self ._write_json ("all_data" , dataclasses .asdict (data ))
392- self ._write_json ("notifications" , extra ["notifications" ])
390+ self ._write_json ("notifications" , data . gateway ["notifications" ])
393391
394392 location_list = smile ._thermo_locs
395393
396- _LOGGER .info ("Gateway id = %s" , extra ["gateway_id" ])
394+ _LOGGER .info ("Gateway id = %s" , data . gateway ["gateway_id" ])
397395 _LOGGER .info ("Hostname = %s" , smile .smile_hostname )
398- _LOGGER .info ("Extra = %s" , extra )
399- _LOGGER .info ("Device list = %s" , device_list )
400- self .show_setup (location_list , device_list )
396+ _LOGGER .info ("Gateway data = %s" , data . gateway )
397+ _LOGGER .info ("Device list = %s" , data . devices )
398+ self .show_setup (location_list , data . devices )
401399
402400 # Count the available device-items.
403401 self .device_items = 0
404- for _ , details in device_list .items ():
402+ for _ , details in data . devices .items ():
405403 for dev_key , _ in details .items ():
406404 self .device_items += 1
407405 if dev_key in bsw_list or dev_key in pw_constants .ACTIVE_ACTUATORS :
@@ -415,9 +413,9 @@ async def device_test(self, smile=pw_smile.Smile, testdata=None):
415413 asserts = 0
416414 for testdevice , measurements in testdata .items ():
417415 tests += 1
418- assert testdevice in device_list
416+ assert testdevice in data . devices
419417 asserts += 1
420- for dev_id , details in device_list .items ():
418+ for dev_id , details in data . devices .items ():
421419 if testdevice == dev_id :
422420 _LOGGER .info (
423421 "%s" ,
0 commit comments