This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
Closed
Trigger from app.js to settings
Hi,
I try to get a trigger propagated from the app.js file to the settings file. Currently, when I set a variable in the settings file I can subscribe to that setting in the app.js file with
Homey.manager('settings').on('set', function(variableName) { ...... });
The other way around I think I have a mistake. Saving the trigger works with
Homey.manager('settings').set('variables', variables);
Retrieving it in the settings page does not work:
Anyone know what I'm doing wrong? Or how I can achieve this?
I try to get a trigger propagated from the app.js file to the settings file. Currently, when I set a variable in the settings file I can subscribe to that setting in the app.js file with
Homey.manager('settings').on('set', function(variableName) { ...... });
The other way around I think I have a mistake. Saving the trigger works with
Homey.manager('settings').set('variables', variables);
Retrieving it in the settings page does not work:
Homey.on('set', function (variable) {
console.log(variable);
});
Anyone know what I'm doing wrong? Or how I can achieve this?
This discussion has been closed.
Comments
And in settings: