Adapted code to latest stable ESH release
Signed-off-by: Kai Kreuzer <kai@openhab.org> (github: @kaikreuzer)