I want to sum the values of 3 items (3phase energy meter) and display them in a custom widget.
Is this possible? I already tried this by rule and DSL script but couldn´t get that working.
Result of the below script: Script execution of rule with UID ‘PowerSumRule’ failed: rule “PowerSumRule”.
rule "PowerSumRule"
when
Item Shelly3EMSHEM3_L1 changed or
Item Shelly3EMSHEM3_L2 changed or
Item Shelly3EMSHEM3_L3 changed
then
PowerSum.postUpdate((itemValue('Shelly3EMSHEM3_L1') as Number) + ((itemValue('Shelly3EMSHEM3_L2') as Number) + ((itemValue('Shelly3EMSHEM3_L3') as Number))
end
@rpwong You know I came to openHAB with 3.0 so thanks for the hint, I expected there would be some arithmetic functions I just have no clue where to use these. In groups which whyever are also called model.
EDIT: okay I did it now, with the blocky scripting for idiots
Hm that looks comfy but my group window doesn´t show any group settings. Anyway, I got a solution now. I´ll keep the group thing in mind. Might be helpful in other situations. Especially with the min/max. thanks