openhab-webui icon indicating copy to clipboard operation
openhab-webui copied to clipboard

[Main UI] stateDescription values retrieved from the binding are not shown unter Meta Data / State Description

Open MHerbst opened this issue 4 years ago • 3 comments

The problem

I am not sure whether this is a bug in Main UI or intended behaviour:

The Homematic binding creates all thing and channel definitions dynamically. For a dimmer there is a channel-type “LEVEL”. This channel-type contains several entries as you can see here:

image

The entries are correctly considered e.g. in he equipment display:

image

But when I open “Add Metadata / State Descriptions” the values for “Max”, “Min”, … are empty:

value: ""
config: {}

I found the same behaviour with other bindings (e.g. Shelly binding)

Expected behavior

Pre-occupy the meta data settings with the values retrieved from the binding.

Steps to reproduce

  1. Use a binding that contains a channel of type dimmer with stateDescription values for "minimum", "maximum", "step"
  2. Create an item for this channel
  3. Open "Add Metadata / State Descriptions"

Your environment

runtimeInfo:
  version: 3.1.0
  buildString: "Build #2107"
locale: en_DE
systemInfo:
  configFolder: /etc/openhab
  userdataFolder: /var/lib/openhab
  logFolder: /var/log/openhab
  javaVersion: 11.0.9.1
  javaVendor: Azul Systems, Inc.
  javaVendorVersion: Zulu11.43+55-CA
  osName: Linux
  osVersion: 5.4.0-58-generic
  osArchitecture: amd64
  availableProcessors: 8
  freeMemory: 23140880
  totalMemory: 230686720
bindings:
  - homematic
  - shelly
clientInfo:
  device:
    ios: false
    android: false
    androidChrome: false
    desktop: true
    iphone: false
    ipod: false
    ipad: false
    edge: false
    ie: false
    firefox: true
    macos: false
    windows: true
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    os: windows
    pixelRatio: 1.5
    prefersColorScheme: light
  isSecureContext: false
  locationbarVisible: true
  menubarVisible: true
  navigator:
    cookieEnabled: true
    deviceMemory: N/A
    hardwareConcurrency: 16
    language: de
    languages:
      - de
      - en-US
      - en
    onLine: true
    platform: Win32
  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: filled
    homeNavbar: default
    homeBackground: default
    expandableCardAnimation: default
  userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101
    Firefox/84.0
timestamp: 2020-12-30T18:45:56.634Z

Browser console


Browser network traffic

Additional information

MHerbst avatar Dec 30 '20 18:12 MHerbst

Not really a bug IMHO - the metadata is reflected as it is, and the purpose is to override whatever state description is already present. Nevertheless it could be useful to present those by default, as long as it avoids saving them as metadata - only those which are really needed to override should end up in the metadata. Besides the metadata editor doesn't have access to the whole item structure currently - only the name.

ghys avatar Jan 08 '21 17:01 ghys

OK, I agree with you. Would be nice if the values could be somehow visible in the UI

MHerbst avatar Jan 08 '21 17:01 MHerbst

+1

All information provided by the binding should act as default or even make specified attributes read-only.

The binding developer puts in that info for technical reasons, e.g. parameter only accepts a certain range. Why let the user change those if they doesn't work at all?

markus7017 avatar Jan 09 '22 07:01 markus7017