Dashticz / dashticz_v2

Alternative dashboard for Domoticz
107 stars 62 forks source link

Custom application Garbage and settings popup via screen #307

Open ericvb opened 6 years ago

ericvb commented 6 years ago

We added manually following configuration to the CONFIG.js file: config['garbage'] = { gft: {kliko: 'green', code: '#375b23', name: 'GFT', icon: 'img/garbage/kliko_green.png'}, pmd: {kliko: 'orange', code: '#db5518', name: 'PMD', icon: 'img/garbage/kliko_orange.png'}, rest: {kliko: 'grey', code: '#5e5d5c', name: 'Restafval', icon: 'img/garbage/kliko_grey.png'}, papier: {kliko: 'blue', code: '#153477', name: 'Papier', icon: 'img/garbage/kliko_blue.png'}, kca: {kliko: 'red', code: '#b21807', name: 'Chemisch afval', icon: 'img/garbage/kliko_red.png'}, brown: {kliko: 'brown', code: '#7c3607', name: 'Bruin', icon: 'img/garbage/kliko_brown.png'}, black: {kliko: 'black', code: '#000000', name: 'Zwart', icon: 'img/garbage/kliko_black.png'}, milieu: {kliko: 'yellow', code: '#f9e231', name: 'Geel', icon: 'img/garbage/kliko_yellow.png'}, kerstboom: {kliko: 'green', code: '#375b23', name: 'Kerstboom', icon: 'img/garbage/tree.png'}, }; to change for example wrong colors for our region like mentioned in the wiki.

If now we open the settings via the dashticz screen and save these settings, Dashticz will not load anymore because of wrong configuration.

robgeerts commented 6 years ago

I dont think its because of this config... When I add this code it is still working...

ericvb commented 6 years ago

After the save of the settings via the dashticz screen, I see following in the config: gft: {kliko: 'green', code: '#375b23', name: 'GFT', icon: 'img/garbage/kliko_green.png'}, pmd: {kliko: 'orange', code: '#db5518', name: 'PMD', icon: 'img/garbage/kliko_orange.png'}, rest: {kliko: 'grey', code: '#5e5d5c', name: 'Restafval', icon: 'img/garbage/kliko_grey.png'}, papier: {kliko: 'blue', code: '#153477', name: 'Papier', icon: 'img/garbage/kliko_blue.png'}, kca: {kliko: 'red', code: '#b21807', name: 'Chemisch afval', icon: 'img/garbage/kliko_red.png'}, brown: {kliko: 'brown', code: '#7c3607', name: 'Bruin', icon: 'img/garbage/kliko_brown.png'}, black: {kliko: 'black', code: '#000000', name: 'Zwart', icon: 'img/garbage/kliko_black.png'}, milieu: {kliko: 'yellow', code: '#f9e231', name: 'Geel', icon: 'img/garbage/kliko_yellow.png'}, kerstboom: {kliko: 'green', code: '#375b23', name: 'Kerstboom', icon: 'img/garbage/tree.png'}, };

The line config['garbage'] = { has gone, leaving the configuration file in a not valid state.

So to reproduce:

  1. add manually the code to the CONFIG.js file
  2. load the dashticz screen and click on the settings button
  3. save the configuration via the popup window Dashticz doesn't load anymore