I have multiple group items which average out temperatures across all the sensors in every room like so:
Group:Number:AVG HKTKitchen_Average_Temp "Avg. temp [%.1f °C]" <temperature> (Kitchen, Smart_Thermostat, Sensors)
This works very well and lets me easily add items to the average when I put them in the room’s appropriate average temperature group (in this case, HKTKitchen_Average_Temp). These averages should also be stored in influxDB persistence (group Sensors* is in influxdb.persist).
Unfortunately, I can’t graph them with Graphana or the “chart” widget in HabPanel. Now, a bit of searching reveals that inability to graph group items is a known issue (in graphana at least) and one of the suggested solutions is to have the group item save it’s state into a non-group item every time it is updated.
Now, I could imagine the code for this would look something like this:
rule "do conversion" when group_average_item changed then non_group_average_item.postUpdate(group_average_item.state) end
The problem is that
I’m too lazy I’d rather not to write this 30+ times (I have a lot of zones) and even with copy/paste and find/replace, this strikes me as something that should be able to be efficiently handled. What would be the quickest and least effort way of doing this?