rdslw
(Rado Sław)
1
I need to access item metadata from DSL rules
val SwitchItem myitem = ScriptServiceUtil.getItemRegistry.getItem( myitemname )
myitem.getMetadata("mymetaname").value // this does not work
is my only option restapi from inside of DSL rules?
or maybe 5.0 implements this?
couldnt find any solution on forums 
jimtng
(jimtng)
2
This is still not implemented in OH5. Theoretically it can be implemented, but you’d need to find someone motivated to do so.
Or, you can delve into the openhab java API from RulesDSL to do it. I think it’s possible, albeit a bit more cumbersome.
Alternatively, switch to jsscripting, jruby or python.
mstormi
(Markus Storm)
3
@Lolodomo AFAIK you’re still using a lot of DSL.
Would you maybe be willing to take a shot at this?
1 Like