Hello!
I’ve moved from 2.5 to 3.1 and now I’m trying create user friendly interface.
1.
Now I don’t know how create button ( is it a button or maybe widget? ) with avg temp on it.
Something like that but with temperature instead NULL:
The MainUI interface is fairly different not only in syntax, but in concept from the old basic UI. The best thing for you to do is to start at the beginning of the UI docs and work your way through. Your questions should be answered by the explanations and examples in those docs. In particular the Overview, the Layout Page, and the Building Pages docs should help.
I don’t know what your trying to do, but perhaps trying to display an equipment is not the correct approach, maybe you need to use a normal group? If your still wanting to display the average temperature then you would use a normal group not the ‘equipment’ sub type. It would also help if you showed the group expanded to show what is a member of the group.
I’m not the best person to help with this as I dont try and create fancy UI’s, instead I try to create automations and voice control so others in my house dont need to open an app or walk to a tablet. The UI is just for me as the admin to test with so best to get someone with more knowledge and experience to comment.
Because of the way the model cards are setup, groups, it seems, were never considered a likely default item type (all the other items are sorted by their semantic groups or tags, so displaying group items just doesn’t make sense in most cases). So when you try to include a group item, it just defaults to an oh-label-item without too much extra detail, including, not reporting the state because most groups do not have a state worth reporting. Since your use case is different you will have to supply a new default widget for the model cards to use on your group.
It appears that you have given the object a default standalone widget, but this does not impact the appearance of the items on the model cards, those are in a list and therefore use the default list widget metadata instead.
There’s a special case here. Without some sort of extra information from you, there’s no way for the system to know which is the “important” temperature of the various temperature points in that location. Since it can’t decide it just uses the average. You can override this default behavior by adding the temperature point that you want directly to the location group as well. You can see below that the temperature item is a point of the sensor equipment but also shows a has location tag because of the direct membership in the location group.