Text item=gNetstatShelly25 icon=rollershutter valuecolor=[0="green", >0="maroon"]
As expected the sitemap shows the number Shellys which are currently offline.
Is there a possibility to get an one entry in the sitemap, that shows the something like “Number/Total” e.g. 9/10 OR like a percentage value, e.g. 90%
Of course, it is possible to define two groups with functions, e.g. one to count the online items and one to count the offline items. But in that case, I would have two entries in the sitemap, too AND in fact two groups to be used in the items. Therefore: Is there an elegant way to only use one group (with function) and as a result with one entry in the sitemap?
You already know how many Items are in the Group. So your best bet is to hard code that into the label.
"Shelly 2.5 Offline [%d of 10]"
You can’t mix Items into the same entry on a sitemap and the only thing you have access to is the state of the Item, not how many members are in the Group. In fact, the sitemap doesn’t even know nor does it care that it even is a Group. It just sees an Item with a state.
Hard coding is usually not my favorite - but, you’re right, for this case it would be the easiest solution. Moreover, this would probably only affect the .items file, which must be adapted in anycase (e.g. register a new item and increase the number manually).
Yeah, also a good idea. Sounds like a virtual item which would be updated by rules after changes of the other groups.
Thank you both for the ideas!!
I’m going to use the hard coded version and try additionally the second option.