Dashticz / dashticz_v2

Alternative dashboard for Domoticz
107 stars 62 forks source link

Can't customize icon for multiblock IDX #485

Closed gohamstergo closed 4 years ago

gohamstergo commented 4 years ago

When adding multiple blocks from a single IDX via 'IDX_n' it seems impossible to specify a custom icon.

in CONFIG.js: blocks[1]['icon'] does nothing

and in custom.js

function getExtendedBlockTypes(blocktypes){
    blocktypes.SubType['kWh'] = { icon: 'fas fa-plug', title: '<Name>', value: '<Title>' }
    return blocktypes;
}

makes the block appear empty, without text. I have tried matching by Name, Type, Subtype, etc. All produce same result.

edit: also tried:

    blocktypes.SubType['kWh'] = {};
    blocktypes.SubType['kWh']['usage'] = { icon: 'fas fa-plug', title: '<Name>', value: '<Usage>', format: true, decimals: 1};
    blocktypes.SubType['kWh']['today'] = { icon: 'fas fa-plug', title: '<Name>', value: '<CounterToday>', format: true, decimals: 1};

no joy. Not really an expert hear, just trying to mimic what I see in blocks.js

gohamstergo commented 4 years ago

nevermind, found this post. https://www.domoticz.com/forum/viewtopic.php?f=67&t=28602&sid=f9339b37e0dcf00e6ba597d31c51de80

lokonli commented 4 years ago

Please note that Dashticz moved to a new repository: https://github.com/Dashticz/dashticz