Repository: home-assistant/core
File: homeassistant/components/zwave_js/__init__.py (Python)

Code before:
            )

        # After ensuring the node is set up in HA, we should check if the node's
        # device config has changed, and if so, issue a repair registry entry for a
        # possible reinterview
        if not node.is_controller_node:
            if await node.async_has_device_config_changed():
                device_name = device.name_by_user or device.name or "Unnamed device"
                async_create_issue(
                    self.hass,
                    DOMAIN,
                    f"device_config_file_changed.{device.id}",
                    data={"device_id": device.id, "device_name": device_name},
                    is_fixable=True,
                    is_persistent=False,
                    translation_key="device_config_file_changed",
                    translation_placeholders={"device_name": device_name},
                    severity=IssueSeverity.WARNING,
                )
            else:
                # Clear any existing repair issue if the device config is not considered
                # changed. This can happen when the original issue was created by
                # an upstream bug, or the change has been reverted.
                async_delete_issue(
                    self.hass, DOMAIN, f"device_config_file_changed.{device.id}"
                )

    async def async_handle_discovery_info(
        self,
        device: dr.DeviceEntry,
        disc_info: PlatformZwaveDiscoveryInfo,
        value_updates_disc_info: dict[str, PlatformZwaveDiscoveryInfo],
    ) -> None:
        """Handle discovery info and all dependent tasks."""
        platform = disc_info.platform
        # This migration logic was added in 2021.3 to handle a breaking change to
        # the value_id format. Some time in the future, this call (as well as the
        # helper functions) can be removed.
        async_migrate_discovered_value(
            self.hass,
            self.ent_reg,
            self.controller_events.registered_unique_ids[device.id][platform],
            device,
            self.controller_events.driver_events.driver,
            disc_info,
        )

        LOGGER.debug("Discovered entity: %s", disc_info)
        async_dispatcher_send(
            self.hass,
            f"{DOMAIN}_{self.config_entry.entry_id}_add_{platform}",

Review comment (bug):
```suggestion
            issue_id = f"device_config_file_changed.{device.id}"
            if await node.async_has_device_config_changed():
                device_name = device.name_by_user or device.name or "Unnamed device"
                async_create_issue(
                    self.hass,
                    DOMAIN,
                    issue_id,
                    data={"device_id": device.id, "device_name": device_name},
                    is_fixable=True,
                    is_persistent=False,
                    translation_key="device_config_file_changed",
                    translation_placeholders={"device_name": device_name},
                    severity=IssueSeverity.WARNING,
                )
            else:
                # Clear any existing repair issue if the device config is not considered
                # changed. This can happen when the original issue was created by
                # an upstream bug, or the change has been reverted.
                async_delete_issue(self.hass, DOMAIN, issue_id)
```

Code after:
            )

        # After ensuring the node is set up in HA, we should check if the node's
        # device config has changed, and if so, issue a repair registry entry for a
        # possible reinterview
        if not node.is_controller_node:
            issue_id = f"device_config_file_changed.{device.id}"
            if await node.async_has_device_config_changed():
                device_name = device.name_by_user or device.name or "Unnamed device"
                async_create_issue(
                    self.hass,
                    DOMAIN,
                    issue_id,
                    data={"device_id": device.id, "device_name": device_name},
                    is_fixable=True,
                    is_persistent=False,
                    translation_key="device_config_file_changed",
                    translation_placeholders={"device_name": device_name},
                    severity=IssueSeverity.WARNING,
                )
            else:
                # Clear any existing repair issue if the device config is not considered
                # changed. This can happen when the original issue was created by
                # an upstream bug, or the change has been reverted.
                async_delete_issue(self.hass, DOMAIN, issue_id)

    async def async_handle_discovery_info(
        self,
        device: dr.DeviceEntry,
        disc_info: PlatformZwaveDiscoveryInfo,
        value_updates_disc_info: dict[str, PlatformZwaveDiscoveryInfo],
    ) -> None:
        """Handle discovery info and all dependent tasks."""
        platform = disc_info.platform
        # This migration logic was added in 2021.3 to handle a breaking change to
        # the value_id format. Some time in the future, this call (as well as the
        # helper functions) can be removed.
        async_migrate_discovered_value(
            self.hass,
            self.ent_reg,
            self.controller_events.registered_unique_ids[device.id][platform],
            device,
            self.controller_events.driver_events.driver,
            disc_info,
        )

        LOGGER.debug("Discovered entity: %s", disc_info)
        async_dispatcher_send(
            self.hass,
            f"{DOMAIN}_{self.config_entry.entry_id}_add_{platform}",
            disc_info,