I’m trying to use proper-case (Off vs. OFF) on HabPanel dummy items tied to groups. Is there a way to transform group items? If so, can you provide the syntax for it please . . .
just tried to achieve this over the MainUI ( 4.1.0.M4), but I dont have an option to select transformation for a group Items via ui. That only is possible when I have linked a thing channel…
You don’t have that option for an Item either. It’s important to understand the parts of the flow:
Thing: represents the device
Channel: represents a single sensor or actuator on the device
Link: connects a Channel to an Item
Profile: works at the Link to modify or otherwise manipulate the state updates flowing from the Channel to the Item and commands from the Item to the Channel
Items: represents the sensor or actuator within OH
The transform Profile can only be applied at the Link. But that isn’t the only place a transform can be applied.
To apply a transform at the Item level you use the State Description metadata’s Pattern field. In .items files you’ll use the label field. See Items | openHAB. This works for any type of Item, inclduing Groups.
You can also apply a transformation on some Thing Channels and within rules.
I’d like to followup on this one just to be sure. I’m on OpenHAB 4.3.0 now.
Is it still true, that transformations cannot be applied to the values resulting from a group operation such as AVG (average):
Group:Number:Temperature:AVG Outside_Temp "Outside temperatures' average [%d %unit%]" <temperature>
Outside_Temp is calculated from signals from several different 433 Mhz sensors that are mostly picked up at random. However, this results in uninteresting flicker to Outside_Temp’s state value in its decimals. So, I was wondering whether the simple rounding profile could be applied before Outside_Temp’s value gets updated.… ? But I haven’t seen anything like that in the docs.
Does anybody have an idea? Thanks!
PS: I’m aware that I could also do rounding using a second item and a rule that does the rounding before updating the second item. Or may a second item plus some sort of chained profiles?
No, a profile lives between the channel and an item at the link. There is no link for a Group aggregation function to put the profile.
There is no
Why not put the rounding profiles on each member? You are showing the value to the nearest integer anyway so if you round the values to the nearest integer before they get to the Group, there will be far fewer tiny changes between readings. You’re taking an average though so you still might have lots of decimal places in the average, but they should move around a while lot less frequently.