I am trying to create a delta sensor of multiple sensor. I have an Emporia meter with a Balance sensor that I would like to subscract 1 zigbee sensor value:
This seems to work but I get the negative values in the energy dashboard on a per device item:
I got - more or less - the same issue when I try to add to valuesā¦
I got two sets of solar panels : one in front of the house, one in the back.
The entity of the panels in front is sensor.zonnepanelen_vooraan_actueel_vermogen
The entity of the panels in the back is sensor.zonnepanelen_achteraan_actueel_vermogen
How can I add these 2 values, and create a new value āsensor.zonnepanelen_totaal_vermogenā? that I can display on the home panel
Found it! for use of total power usage in my house:
Create Helper for āCombine the state of several sensorsā , use sensor of power production for your solar panels and sensor of your Net (eg DSMR) power production. Use the āStatistical Rangeā. This wil calculate the own usage of your solar energy.
Create another Helper for āCombine the state of several sensorsā, use the above sensor from 1 and your Net power consumption. Use the āSumā function.
However for other purposes I need the substract function alsoā¦
This can be solve if you think more than 5s About it. You can keep the sumation and add multipliers to the sensor outputs. This could do multiple interesting functions at once.
Please explain the āStatistical Rangeā this does the āsubtractionā; at least it works for me! to have a helper at the end that shows my actual power usage.
Yes, itās not the most obvious way to subtract but it works for two enties. So for entities a, b statistical_range gives modulus(a-b) not quite true subtraction but would work ok if you know one is always bigger than the other, otherwise could confuse.
Simple replace sensor1 and sensor2 with your entity ids.
First argument of float function is the precision of rounding. In the example I donāt care about the decimal places at all. Pipe Sensor values to a float function have the effect that Unavailable or NaN Values are become a zero before subtraction.
Thatās not true. The first argument of the float filter is the default value thatās output when the function cannot convert the string to a number.
Hello,
I have the same problem. I have two energy sensors. One for my heat pump, the other general.
It is not possible for me to subtract the heat pump from general consumption. Both are added to Energy dashboard
I have solved it in this way:
Create a Number Helper āMinus-1ā with a fixed value of -1
Create a Helper āHeatpump-Invertedā which multiplies the Heatpump and āMinus-1ā
Sum General Consumption and Heatpump-Inverted, the result is what you want.
smart approach
can you please explain how you created the āHeatpump-Invertedā helper ?
I could not figure out how to multiply a helper with another helper
Iām obviously not experienced enough
Hello.
Great info butā¦ probably I am doing something wrong.
I challenge you to find a solution on this.
(I used all kind of search tricks and no relevant result was found)
The calculated value is not considered numeric.
I give you the example:
created template numeric for battery SOH (I change it manually because cannot be read from BMS with comm) eg ā¦97
created template for 1/100 divider
created template for brutto/designed battery capacity eg 15.3 (kwh)
created the group with product for all of three above named ācalculated_battery_capacityā
The result is correctly calculated but is not numeric because I cannot see it in a graph/line.
and because is not numeric, I cannot set resolution/precision 0.00 0.000.
It is considered string.
How can I create it to be considered numeric?
And I wish to use this result on calculating other new values (reserved capacity, actual remaining usable capacity, etcetera)