Group Item displayState in UI

Hi,
i have a UI widget like:
image

the lower right value is a sum of two items.

text: =(Number.parseFloat(items[props.Konv_Home_power].state)) + (Number.parseFloat(items[props.Konv_HomefromGrid_power].state)) + ’ W’

now i want to use displayState like for upper right and left value

text: =items[props.DC_power].displayState

which are defined as:

Number:Power konvertA_P_totDC “konvertA_P_totDC” (gKonvertaPower) {channel=“modbus:data:konvertA:Acutals:konvertA_P_totDC:number”, stateDescription=" “[ pattern=”%.0f W"]}

which works fine.

So i created a GroupSum item

Group:Number:SUM g_P_Home “g_P_Home” { stateDescription=" “[ pattern=”%.0f W"]}

Number:Power konvertA_P_Grid “konvertA_P_Grid” (gKonvertaPower,g_P_Home) {channel=“modbus:data:konvertA:Acutals:konvertA_P_Grid:number”, stateDescription=" “[ pattern=”%.0f W"]}

Number:Power konvertA_P_Pv “konvertA_P_Pv” (gKonvertaPower,g_P_Home) {channel=“modbus:data:konvertA:Acutals:konvertA_P_Pv:number”, stateDescription=" “[ pattern=”%.0f W"]}

but here the displayState is not accessible. (i assume it has to to with the members which are returned via rest)

does someone has a solution here?

Greets

Note that Group aggregated state will not be calculated internally until one of the members changes.

does stateDescription work for a GroupItem?
in VScode for items the right displayState is shown, but not for the groupitem.

Nice widget. Do you mind sharing it ?

Missed this at first; you’re summing Number:Power types.
Group:Number:Power:SUM g_P_Home ...

I’m not convinced that will help much.

MainUI is weird about this, who knows. Maybe in this UI it inherits from members. Maybe it would still see it the old fashioned way.

Group:Number:Power:SUM g_P_Home “g_P_Home [%.0f W]”...

thanks @mstormi

i uploaded it to

i omitted the converter image because of copyright concerns, but it can be extracted from your vonverter webpage.

Feel free to suggest improvements.

sorry i made a mistake with the props

text: =items[props.Konv_HomeGrid_power].displayState

with

Group:Number:SUM g_P_Home { stateDescription=" “[ pattern=”%.0f W"]}

works.

1 Like