I started a rule in RM to watch my Aeotec Home Energy Monitor. The first part of the rule took the value of 'Power' from the monitor (which is updated every 30 secs) rounded it and copied it to a Hub Variable. It also took the 'Energy' value (updated every minute), rounded it and did some math to get the cost. It's a messy rule as each calculation is an additional operation. I wanted to try setting it up in node red instead but I'm struggling.
For the first part I'm just trying to round the value and write it back to a Hub Variable. The Hubitat device node is set as shown and the output is as below:
I want to round that 'value' or 'currentValue' and write it back to my Hub Variable (preferably appended with W) using the Command node:
Any pointers as to what node goes between the Device and Command nodes (function I guess?) and how to set it up? Apologies I'm brand new to node red so I'm struggling with the basics.