Closed hugo82000 closed 5 years ago
This is in my currentweather.js
return wrapper;
},
////////////////////////////////////////////////////////////////////////////////////:
notificationReceived: function(notification, payload) { if (notification === 'HIDE_WEATHER') { this.hide(1000); } else if (notification === 'SHOW_WEATHER') { this.show(1000); }
},
/////////////////////////////////////////////////////////////////////////////////////////
This is in my MMM-voice
` // MMM-voice sends notification to MMM-BMW-DS to HIDE else if (notification === 'HIDE_WEATHER') { this.sendNotification('HIDE_WEATHER'); }
// MMM-voice sends notification to MMM-BMW-DS to SHOW
else if (notification === 'SHOW_WEATHER') {
this.sendNotification('SHOW_WEATHER');
}`
And this in my node_helper.js
else if (/(SHOW)/g.test(data) && /(WEATHER)/g.test(data)) { this.sendSocketNotification('SHOW_WEATHER'); } else if (/(HIDE)/g.test(data) && /(WEATHER)/g.test(data)) { this.sendSocketNotification('HIDE_WEATHER'); }
Are you referring to the weatherforecast and currentweather that come with MM? Your example above says MMM-BMW-DS. I can help you but I need to know what module(s) specifically
I just uploaded the weatherforecast.js file and the currentweather.js file to this repo. They are in the Replacement Module Files folder. Put them in their respective folders within the MagicMirror/modules/default folder. They will now work by saying HIDE WEATHER AND SHOW WEATHER. MMM-BWM-DS will also work using these commands. If you want them on certain pages then please follow the readme
That should take care of your issue
Hello, first thank you for you work it's really impressive!
I'm trying to hide the weather default module. I followed your tuto on github on how to add a module but it don't work.. Is your tuto complete or missing some things maybe..?