@@ -129,7 +129,8 @@ async def async_remove_config_entry_device(
129129 """Handle the 'Delete' button on a device page in the HA UI.
130130
131131 Called by HA when the user clicks Delete on a device card.
132- Box devices are not deletable via this path — return False to block.
132+ Box devices and the MSP service device are not deletable via this path —
133+ return False to block.
133134 For network devices, call the Firewalla API to remove the device record,
134135 then return True to allow HA to remove it from the device registry.
135136 If the API call fails we still return True so the user can clean up
@@ -140,8 +141,10 @@ async def async_remove_config_entry_device(
140141 for domain , identifier in device_entry .identifiers :
141142 if domain != DOMAIN :
142143 continue
143- if identifier .startswith ("box_" ):
144- # Box devices should not be deleted from here
144+ # v2.4.9.1: Block deletion of box devices AND the MSP service device.
145+ # Without the msp_global_ check, clicking Delete on the 'Firewalla MSP'
146+ # device card orphans all MSP-level entities until next reload.
147+ if identifier .startswith ("box_" ) or identifier .startswith ("msp_global_" ):
145148 return False
146149 fw_device_id = identifier
147150
@@ -348,8 +351,10 @@ async def _handle_rename_device(call: ServiceCall) -> None:
348351 for domain , identifier in device_entry .identifiers :
349352 if domain != DOMAIN :
350353 continue
351- if identifier .startswith ("box_" ):
352- continue # Skip box identifiers
354+ # v2.4.9.1: Skip box and MSP service device identifiers —
355+ # these are not renamable network devices.
356+ if identifier .startswith ("box_" ) or identifier .startswith ("msp_global_" ):
357+ continue
353358 fw_device_id = identifier
354359
355360 if not fw_device_id :
0 commit comments