How to capture data from config file while pasting the dashboard

Product/components used and version/fix level:

Detailed explanation of the problem:

We have cloned a custom cockpit with version 1015.0.364 and developed one custom widget called consumptionComponent and its config component as consumptionConfig to show device measurements data in the widget based on some data selection from its config component.

For Example:

While adding the widget user should select some measurement type and interval from its config component from the dropdown, that dropdown data comes dynamically (i.e Data will change from device to device).

We are capturing that data as @Input() config in the component based on the user selection we are triggering measurements end point displayed data in the component.

Now this component added in one dashboard and we have a option to copy and paste the dashboard in diff device, Now the issue while pasting the dashboard into diff device the measurement type and interval data is taking from where I copied not taking from config file.

Component Module

    declarations: [SOLPoolConsumptionComponentConfig, SOLPoolConsumptionConfig ],
    entryComponents: [SOLPoolConsumptionComponentConfig, SOLPoolConsumptionConfig],
    imports: [
    providers: [ {
        provide: HOOK_COMPONENTS,
        multi: true,
        useValue: {
            id: 'sol-pool-consumption-configuration.widget',
            label: 'Pool Consumption',
            description: 'Pool consumption',
            component: SOLPoolConsumptionComponentConfig,
            configComponent: SOLPoolConsumptionConfig,
            previewImage: require("./assets/images/pool-cons-preview.png"),
            data: {
                settings: {
                    noNewWidgets: false,
                        _width: 4,
                        _height: 3,
                    ng1: {
                        options: {
                            noDeviceTarget: true,
                            groupsSelectable: false,

Error messages / full error message screenshot / log file:

Now the issue is while pasting the dashboard into diff device the measurement type and interval data is taking from where I copied not taking from config file to get the data user need to click edit and select the data from dropdown.

Question related to a free trial, or to a production (customer) instance?

Cumulocity Production


Which attribute within the config object do you use to store the device related information in?
The default device attribute would usually be replaced, when copying the dashboard, with the new device context, but this only works in case the configured device of the widget matches the context of the dashboard you are copying from.

I am taking my custom fragment object this.config.settings.context.sol_feeder in config component from context and based on that I am populating drop down data as below.

and receiving the data in to child component as below and fetching relevant data by passing this selected type and period to end point.

@Input() config

Now I have copied the dashboard from device one and pasting in to device two Since I am taking my input params from parent component (config component) if I access like below I will get device one type and time period.