How can I read the Longitude and Latitude coordinates of my Homey using a script?

Hello reader,

I am a newbie and not really familiar with Homeyscript yet.
But is there a way to read the coordinates of the Location setting using a script?
Are there any reference pages where I can look up more information about the commands and their corresponding options that can be used in Homeyscript?

Thanks in advance for the help with these two questions.

That’s pretty easy to do, and “all” information about it, is found on the developer WebAPI pages:

const location = await Homey.geolocation.getOptionLocation();
log('latitude: ', location.value.latitude);
log('longitude: ', location.value.longitude);

Thank you, it works.