Chart an average value

Hello I started programming just few days ago and I am still figuring out how everything works.
Following the demo I have the average value of all temperatures in the house by the item

Group:Number:AVG Temperature “Temperatura Media [%.1f °C]” (Stato,Temperature_Chart)

which is a group of 9 temperatures that are basically wrote like this

Number Temperature_PT_Bagnetto “Bagnetto[%.1f °C]” (Temperature, PT_Bagnetto)
Number Temperature_PT_Salotto “Salotto[%.1f °C]” (Temperature, PT_Salotto)

In the sitemap I have the value wrote as a string and plotted as achart by the statements

Text item=Temperature
Chart item=Temperature period=h refresh=6000

What happens is that the value is correct but in the chart all the values are plotted and not the average

Thanks everyone.

p.s. I don’t know how to make the code looks like a code

Groups are special cases and not persisted. Only Items get saved and therefore only Items can be charted. If you want to chart the average you will have to calculate it and store it in a separate Item using a rule.

1 Like

Thanks, I will start looking in rules forum :slightly_smiling:

Highlight the text you want to look like code, then click on </> (Preformatted text) button:
this should look like code

1 Like

thanks

You can also indent each line by four spaces or do the following:

```
Your code here
```