Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Blockly] Add access to semantic actions #2683

Open
rkoshak opened this issue Jul 22, 2024 · 0 comments
Open

[Blockly] Add access to semantic actions #2683

rkoshak opened this issue Jul 22, 2024 · 0 comments
Labels
enhancement New feature or request main ui Main UI

Comments

@rkoshak
Copy link

rkoshak commented Jul 22, 2024

The problem

Outside of the "inline script" block there is no way to get the parent location Item nor the parent equipment Item nor execvute any of the other Semantic Actions: https://www.openhab.org/docs/configuration/actions.html#semantics

Your suggestion

In openhab-js, these have all been made available on the Item: https://openhab.github.io/openhab-js/items.ItemSemantics.html.

items.MyItem.semantics.isEquipment;
items.MyItem.location

etc.

I don't know though if it make sense to just add these as properties to the "get [name] from item" block or if it makes sense to add a new block. Since they are all exposed as properties the former makes sense to me but the list of properties for that block might be getting a little bit too long an ungangly and it makes sense to keep them in separate blocks.

Your environment

runtimeInfo:
  version: 4.2.0
  buildString: Release Build
locale: en-US
systemInfo:
  configFolder: /openhab/conf
  userdataFolder: /openhab/userdata
  logFolder: /openhab/userdata/logs
  javaVersion: 17.0.11
  javaVendor: Debian
  osName: Linux
  osVersion: 5.15.0-113-generic
  osArchitecture: amd64
  availableProcessors: 4
  freeMemory: 231220544
  totalMemory: 930086912
  uptime: 1214265
  startLevel: 100
addons:
  - automation-jsscripting
  - automation-jsscriptingnashorn
  - binding-amazonechocontrol
  - binding-astro
  - binding-chromecast
  - binding-http
  - binding-ipcamera
  - binding-mail
  - binding-mqtt
  - binding-network
  - binding-networkupstools
  - binding-openweathermap
  - binding-shelly
  - binding-vesync
  - binding-zigbee
  - binding-zwave
  - misc-openhabcloud
  - persistence-mapdb
  - persistence-rrd4j
  - transformation-basicprofiles
  - transformation-jinja
  - transformation-jsonpath
  - transformation-map
  - transformation-regex
  - ui-basic
  - ui-habot
clientInfo:
  device:
    ios: false
    android: false
    androidChrome: false
    desktop: true
    iphone: false
    ipod: false
    ipad: false
    edge: false
    ie: false
    firefox: false
    macos: true
    windows: false
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    os: macos
    pixelRatio: 2
    prefersColorScheme: light
  isSecureContext: false
  locationbarVisible: true
  menubarVisible: true
  navigator:
    cookieEnabled: true
    deviceMemory: N/A
    hardwareConcurrency: 12
    language: en-US
    languages:
      - en-US
      - en
    onLine: true
    platform: MacIntel
  screen:
    width: 2560
    height: 1440
    colorDepth: 24
  support:
    touch: false
    pointerEvents: true
    observer: true
    passiveListener: true
    gestures: false
    intersectionObserver: true
  themeOptions:
    dark: light
    filled: true
    pageTransitionAnimation: default
    bars: light
    homeNavbar: default
    homeBackground: default
    expandableCardAnimation: default
    blocklyRenderer: null
  userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36
    (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
timestamp: 2024-07-22T16:17:23.356Z

Additional information

https://community.openhab.org/t/rule-to-do-action-only-in-rooms-with-presence/157315/8

@rkoshak rkoshak added enhancement New feature or request main ui Main UI labels Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request main ui Main UI
Projects
None yet
Development

No branches or pull requests

1 participant