openhab-webui
openhab-webui copied to clipboard
[Main UI] stateDescription values retrieved from the binding are not shown unter Meta Data / State Description
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:
The entries are correctly considered e.g. in he equipment display:
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
- Use a binding that contains a channel of type dimmer with stateDescription values for "minimum", "maximum", "step"
- Create an item for this channel
- 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
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.
OK, I agree with you. Would be nice if the values could be somehow visible in the UI
+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?