athombv / homey-apps-sdk-issues

This issue tracker is for Homey Developers using the Apps SDK.
21 stars 4 forks source link

Feature request: Allow return of newSettings object in device.onSettings( ) #333

Open RonnyWinkler opened 10 months ago

RonnyWinkler commented 10 months ago

Please allow an optional return parameter for device.onSettings( )to pass back changed settings (the newSettings object with changed content).

Use case: In my app a user can set coordinates for a location which are used to check for a reached/left trigger. To make the setup easier, the user can insert a GoogleMaps link.

grafik

In onSettings( ) I currently check for a changed url, start a 1sec timeout and update the depending coordinates in the timeout handler. But it would( be much better to adjust settings in onSettings( ) and pass back the updated content - to show up in settings screen.

It this would not be possible, a real "onSettingsChanged" event would be nice to handle changed settings after they are stored.