@@ -631,37 +631,37 @@ def _create_legacy_gateway(self) -> None:
631631
632632 Use the home_location or FAKE_APPL as device id.
633633 """
634- if self ._smile_legacy :
635- self .gateway_id = self ._home_location
636- if self .smile_type == "power" :
637- self .gateway_id = FAKE_APPL
634+ self .gateway_id = self ._home_location
635+ if self .smile_type == "power" :
636+ self .gateway_id = FAKE_APPL
638637
639- self ._appl_data [self .gateway_id ] = {"dev_class" : "gateway" }
640- for key , value in {
641- "firmware" : self .smile_fw_version ,
642- "location" : self ._home_location ,
643- "mac_address" : self .smile_mac_address ,
644- "model" : self .smile_model ,
645- "name" : self .smile_name ,
646- "zigbee_mac_address" : self .smile_zigbee_mac_address ,
647- "vendor" : "Plugwise" ,
648- }.items ():
649- if value is not None :
650- self ._appl_data [self .gateway_id ].update ({key : value }) # type: ignore[misc]
638+ self ._appl_data [self .gateway_id ] = {"dev_class" : "gateway" }
639+ for key , value in {
640+ "firmware" : self .smile_fw_version ,
641+ "location" : self ._home_location ,
642+ "mac_address" : self .smile_mac_address ,
643+ "model" : self .smile_model ,
644+ "name" : self .smile_name ,
645+ "zigbee_mac_address" : self .smile_zigbee_mac_address ,
646+ "vendor" : "Plugwise" ,
647+ }.items ():
648+ if value is not None :
649+ self ._appl_data [self .gateway_id ].update ({key : value }) # type: ignore[misc]
651650
652- if self . smile_type == "power" :
653- # For legacy P1 collect the connected SmartMeter info
654- appl = Munch ()
655- self ._p1_smartmeter_info_finder (appl )
651+ # For legacy P1 collect the connected SmartMeter info
652+ if self . smile_type == "power" :
653+ appl = Munch ()
654+ self ._p1_smartmeter_info_finder (appl )
656655
657656 def _all_appliances (self ) -> None :
658657 """Collect all appliances with relevant info."""
659658 self ._all_locations ()
660659
661- self ._create_legacy_gateway ()
662- # Legacy P1 has no more devices
663- if self ._smile_legacy and self .smile_type == "power" :
664- return
660+ if self ._smile_legacy :
661+ self ._create_legacy_gateway ()
662+ # Legacy P1 has no more devices
663+ if self .smile_type == "power" :
664+ return
665665
666666 for appliance in self ._appliances .findall ("./appliance" ):
667667 appl = Munch ()
0 commit comments