just threw everything I had for inputs on the top graph then I broke them out below. But I added a KWH measurement and got to thinking it be fun to also have what that is in Dollars. So I get charged
I’m going to just call it $0.10582 per kWh.
What is the best way to do that equation as a conversion and pull it in as a dashboard widget?
Create a conversion from kwh to a currency, then select that conversion on the input configuration. This will prevent the kwh measurement from being stored.
Use an Equation Function to apply an an equation to an input value (kwh measurement).
So i’ve had the AC running for a while now and if it turned out that equated to $4.25 i’d not be suprised. I think its working or at least the best I can tell! Might be fun to figure out how to check what month it is and then assign the correct formula down the road but that seems like a python script to me for some reason, I’m going to see if I can figure out the kwh to a currency part you were speaking of.
Your graph having such a long X-axis duration suggest the majority of your graph is filled with values of 0 (or near 0). Since the calculation is based on the average for a period, your monthly average is near 0.
There’s an obvious room for improving the code, since you have actual non-0 values in the time frame it’s calculating. It’s all about making the right influxdb query to get an accurate Amp value to calculate kWh. Average doesn’t seem to be the most appropriate.