Add two item values together and show all 3 on a chart

I have two kWh meters. I would like to create a chart that displays each value and the sum of the two values.

I created a chart that displays the two individual measurement values, but how do I add them together for the 3rd value?

Create a third Item. It doesn’t need to be linked to anything or have any place in your semantic model.
You can use a rule triggered by either source Item changing to calculate a new sum and update the third Item.

You will need to make sure the third Item is persisted, for charting.

Dear All, I’m a beginner, and I have similar problems , I have 5 Power data coming from 5 Sonoff POW running Tasmota 8.5.1.
In OpenHabian I have already available the 5 power values , but I need to sum it and have a “total power consumption” to Show and use for other calculation.
I’ve tried to add an item as suggested in previous post , but I’m stuck on the first page of new Item definition , I don’t know how to configure the Item, nothing is available from the page…

Please let me know how to go over.
Many Thanks in advance.
Kind Regards.

Perhaps the first thing to do is to look at the type of your existing Items. You’ll probably want to select the same type for your new Item.
You don’t have to give any category etc.

Thanks for the reply, but I have no idea on how I can “create” a new Item, the picture in previous post show the “edit Item” on OH , but no more option is available there…

This seems to be the right place to create a new Item. If it is not the type, what part of configuring are you having trouble with?

The previous picture show the only page that “Item” definition open, and no field avialable for defining something.
This on OpenHabian 3.0.2
It is really hard to learn this software for “special” needs…
Tutorial on this software help for common things, but mistery remain on specific topics, for sure I’m not use to work on this automation environment.
For sure this is not a friendly software.
Thanks in advance for any help, a manual will be really apreciated, the webpage on openHab is really dedicated to skilled user.
Kind regards

Here is how to create an item in openHAB 3.1.0.M3. Applies for 3.x I believe:

Navigate to items. Click + in lower right to add item.

Click Add Item

This is the Create New Item screenshot. Modify Name, Label, Type as applicable.

I updated name, label and type on this screenshot.

Here is example type screenshot.

Once done, click create.

You should find your new item now.

My problem is obtaining the correct items via script to add together and place the sum/result in this item.

1 Like