PaperUI Location - how to access?

In the PaperUI under Configuration/System/Regional Settings, we can specify Location. How do we get this value in a Rule?

I don’t think that you can. There was another discussiob about this recently and I think that a Feature Request has been submitted.


Scott, I wonder if we could do this using Jython?


There’s not much you can’t do with JSR223…

from org.slf4j import Logger, LoggerFactory
log = LoggerFactory.getLogger("org.eclipse.smarthome.model.script.Rules")
from openhab import osgi
LocationProvider = osgi.get_service("org.eclipse.smarthome.core.i18n.LocationProvider")
log.debug("JSR223: Test [{}]".format(LocationProvider.getLocation()))
1 Like

Awesome, one more script being moved to Jython