I'm not sure if this is me seeking rule making advice or a feature request for more robust variable math, or something else, but I was wondering if anyone knows of a more efficient way to accomplish what I'm doing in this rule. All I want is for a virtual humidity sensor to be the average of 2 real humidity sensors, but it seems like a ton of steps to do it:
If you could do multiple "variable math" operations on 1 line (so rather rather than having to create 'C' you could just set the variable to (A+B)/2;
if you could set the device attribute to variable math rather than having to create a variable to store the value and then sending that value to the device (i.e. combine the last 2 lines of this rule);
Probably want to use a groovy app for that. I was going to suggest another app that I use for temp, that could probably be modified fairly easy, but looks like someone already did something.
I have not tried this one but the explanation would do what you want.
Looks like that code is no longer available, try this one.