Thanks butā¦
Shouldnāt the calculated value to be considered NUMERIC since there were all entities numbers?
I cannot assign unit measure to the result of a group. There is no such option.
I understand everything can be created using yaml text code (for those understanding the code), I even considered using template yaml instead of helper GUI but there are a lot of tipsānātricks, keywords and other chars to be used.
I chose the easy way because It was already there.
I didnāt think of writing complex formulas in the ātemplate stateā box.
What I wonder, nobody seems to complain about the resulted/calculated helper values are not numeric.
I will try to recreate ātemplatesā instead of āgroup:productā keeping the sensor name.
Thatās because the elements of your group have incompatible units, and you probably have an error message about this. Try giving your first element a unit of kWh too.
None of what I posted is YAML. Itās Jinja templates, all within the UI.
Designed capacity has already set kwh units.
Divider is a number.
SOH is set as %
All three are seen in graphs as numbers.
Where is the incompatibility?
Probably if I create SOH as simple number, it may work.
Thanks for the help.
I will take the template approach these days.
System simply isnāt that clever to āmultiplyā the units. Iāve never come across anyone trying to do the maths with this method ā would strongly recommend the template sensor I showed which is a single entity (plus the input number, if you choose to use that).
It does not need to be clever.
It calculates it and I expect to be considered numeric by default not a string.
It is a simple use case. Take 3 numeric entities and make a product (multiply). The displayed result is correct but is not usable as a number in a graph.
(I work in sw testing by the way)
There is no system in place outside of templates that does what you want. Use a template sensor. Set the device class, unit of measure, and state class. It will then be represented as a numerical entity in the ui.
Keep in mind that what troon says is still correct. All states in HA are strings.
Iāve disconnected the humidistat for my Aprilaire whole home humidifier and use a Zigbee dry contact switch now to turn it off and on. Currently I am averaging together 8 hydrometers around the house. The recommended Relative Humidity of the whole home humidifier is ((Outdoor Temperature / 2) + 25). I want to get that Humdistat measurement as a helper so I can create an automation where if the All Home Humidity level helper drops below the Humidistat helper it will kick the humidifer on and vice versa.
Thank you. Sorry, Iām new to Home Assistant from another platform and learning how to utilize templates. I was able to figure it out and do exactly what you described. I have this template tied to a generic hydrostat with an automation that turns the hydrostat on and off depending on if the outdoor temperature is above or below 50° F.
I found this topic. I understand that itās easier to implement addition and multiplication on a helper that has a list of entities. I also know that more complex arithmetic can be solved better in a template sensor, since you can have an expression there that does solve the āorderā thing that is problematic with a list of entities.
That said, the current state of things is confusing at best for novice users. Iād like to suggest a couple of options to make it easier.
A simple solution could be to add separate helpers for subtracting and devision.
The subtract helper could still have a list of entities as argument and would then subtract all values.
The devision helper would have only two arguments. It would also need to have a solution to prevent devision by zero.
An alternative thatā already suggested, is to add an āinvertā checkbox to each entity in the list. Benefit would be that it would still be possible to do a lot with a single helper, while other solutions would require a cascade of multiple helpers to get the desired result. It wouldnāt solve for the devision case though.
Another alternative thatās already suggested in the thread is to implement a separate inverter helper. That would solve for the subtract use case, but not for the devision use case.
Another alternative would be to allow for directly entering a constant value in the helper. Constant values now require a separate helper. With the constant -1 and multiplication, that would basically be the invert helper.
The Group sensor does have multiplication, but the ācombine entitiesā helper does not. Thatās an inconsistency I canāt find a good explanation for.
A more fancy solution would be to create a true arithmetic helper, where you could create arithmetic expressions. Thatās arguably very close to a the template helper though. The benefit would be that it could have more guidance for novice users, or even a graphical expression builder.