@@ -170,9 +170,10 @@ def _get_p1_smartmeter_info(self) -> None:
170170 appl = Munch ()
171171 locator = MODULE_LOCATOR
172172 module_data = self ._get_module_data (self ._home_location , locator )
173- if not module_data ["contents" ]:
174- LOGGER .error ("No module data found for SmartMeter" ) # pragma: no cover
175- return # pragma: no cover
173+ # No module-data present means the device has been removed
174+ if not module_data ["contents" ]: # pragma: no cover
175+ return
176+
176177 appl .available = None
177178 appl .entity_id = self ._gateway_id
178179 appl .firmware = module_data ["firmware_version" ]
@@ -219,15 +220,16 @@ def _appliance_info_finder(self, appl: Munch, appliance: etree.Element) -> Munch
219220 return self ._appl_thermostat_info (appl , appliance )
220221 case "heater_central" :
221222 # Collect heater_central entity info
222- self ._appl_heater_central_info (
223- appl , appliance , False
224- ) # False means non-legacy entity
223+ # 251016: the added guarding below also solves Core Issue #104433
224+ if not (
225+ appl := self ._appl_heater_central_info (
226+ appl , appliance , False
227+ )
228+ ): # False means non-legacy entity
229+ return Munch ()
225230 self ._dhw_allowed_modes = self ._get_appl_actuator_modes (
226231 appliance , "domestic_hot_water_mode_control_functionality"
227232 )
228- # Skip orphaned heater_central (Core Issue #104433)
229- if appl .entity_id != self .heater_id :
230- return Munch ()
231233 return appl
232234 case _ as s if s .endswith ("_plug" ):
233235 # Collect info from plug-types (Plug, Aqara Smart Plug)
0 commit comments