Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Thing:
- Thing exec:command:yourcommand [ command="<YOUR COMMAND> %2$s", interval=0, autorun=false ]
- Items:
- Switch yourcommand_Run {channel="exec:command:yourcommand:run", autoupdate="false"}
- String yourcommand_Out {channel="exec:command:yourcommand:output"}
- String valueItem
- Rule:
- rule "exec json"
- when
- Item yourcommand_Out changed
- then
- val String json = (yourcommand_Out .state as StringType).toString
- val String value = transform("JSONPATH", "$.tiles[?(@.id =~ /889/)].params.value", json)
- valueItem.postUpdate(value)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement