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

[MainUI] Add support for wild card thing status triggerd. #2957

Open
rkoshak opened this issue Dec 30, 2024 · 0 comments
Open

[MainUI] Add support for wild card thing status triggerd. #2957

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

Comments

@rkoshak
Copy link

rkoshak commented Dec 30, 2024

The problem

Apparently wild card Thing triggers has been supported for a couple of years. See openhab/openhab-core#2832.

However, the only way to use one within MainUI is by manually editing the "thingUID" field of the trigger on the code tab. If you select the "empty" Thing at the top of the list when creating the trigger you only have the option for "trigger channels":

image

image

So to make it work one must select any random Thing and then click the code tab and edit it with the wildcard search string:

triggers:
  - id: "3"
    configuration:
      thingUID: chromecast:audiogroup:*
    type: core.ThingStatusChangeTrigger
conditions: []
actions:
  - inputs: {}
    id: "2"
    configuration:
      type: application/javascript
      script: console.info("A thing changed status");
    type: script.ScriptAction

Your suggestion

First, I think that first entry in the list of Things might be a bug. I can't see any way to make anything work at all after selecting that from the list.

Beyond that, one way to implement this might be to change that "empty" thing to become "All Things" and when that is selected, provide the option to enter a search string/filter to match only those Things desired (e.g. all the chromecast Things as I've done above).

Your environment

runtimeInfo:
  version: 4.3.0
  buildString: Release Build
locale: en-US
systemInfo:
  configFolder: /openhab/conf
  userdataFolder: /openhab/userdata
  logFolder: /openhab/userdata/logs
  javaVersion: 17.0.13
  javaVendor: Debian
  osName: Linux
  osVersion: 6.8.0-51-generic
  osArchitecture: amd64
  availableProcessors: 4
  freeMemory: 103178720
  totalMemory: 872415232
  uptime: 528592
  startLevel: 70
addons:
  - automation-jsscripting
  - automation-pidcontroller
  - 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: false
    windows: false
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    pixelRatio: 0.8999999761581421
    prefersColorScheme: light
  isSecureContext: false
  locationbarVisible: true
  menubarVisible: true
  navigator:
    cookieEnabled: true
    deviceMemory: N/A
    hardwareConcurrency: 16
    language: en-US
    languages:
      - en-US
      - en
    onLine: true
    platform: Linux x86_64
  screen:
    width: 2560
    height: 1600
    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 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
    Gecko) Chrome/131.0.0.0 Safari/537.36
timestamp: 2024-12-30T17:20:34.976Z

Additional information

I don't think console logs from the browser are relevant but can provide them if needed.

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