google-code-export / openhab

Automatically exported from code.google.com/p/openhab
GNU General Public License v3.0
0 stars 0 forks source link

Full Read/Write of Item properties (e. g. text label) #488

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. Feature Description

It would be fantastic if all Item properties were to be made accessible 
(read/write). The properties that come to mind which are not already accessible 
are: text label and icon

2. Example Use Case

a) Loop through a group of devices and print the human readable name (text 
label) to a notification or log

b) Dynamically change the text of an item based on arbitrary event

c) Dynamically change the icon based on arbitrary event

Original issue reported on code.google.com by martin.e...@gmail.com on 11 Oct 2013 at 6:00

GoogleCodeExporter commented 9 years ago
I am trying to dynamically add date to Temperature data bu changing text in UI 
from "temp1"  to "Temp1 at 2013-12-01".

This in order to see latest update of a temperature.

Maybe this is not possible at present  and above feature needed?

Original comment by janannons on 1 Dec 2013 at 2:37

GoogleCodeExporter commented 9 years ago
Yes, as far as I understand, you need this feature for that.

Original comment by martin.e...@gmail.com on 1 Dec 2013 at 9:55

GoogleCodeExporter commented 9 years ago
The only property an item has is actually its state - and this can of course be 
dynamically changed :-)
Things like labels and icons can be context specific - for different UIs, 
sitemaps, clients different labels or icons can be used. Hence this feature 
request is simply technically not possible to implement.

Original comment by kai.openhab on 8 Dec 2013 at 8:22

GoogleCodeExporter commented 9 years ago
ok so then we must use an additional string item and update its state if we 
want a text that changes due to an event - this works today.

Or maybe a workaround to dynamically update an items file with new label for an 
item (probably out of reach for normal users  programming in OpenHAB).

And use case 2a) could work if one makes a database table or similar on the 
side with items definitions and item label - and then make sure to correlate 
those with items files (so they are the same) and then add some code before 
logging, and fetch info from database table.

Original comment by janannons on 8 Dec 2013 at 9:45