My goal is pretty simple: I want to take my current electricity usage in kWh and multiply it by my current Time-of-Use rate from the utility, and display the current cost on a custom control page.
I am using the TED Home plugin to get my current usage in kWh, and have a bunch of Indigo schedules that set a variable called currentElectricityRate. This is because my utility went to a complicated TOU schedule that TED back-end cannot support correctly.
My thought was if I could have 2 variables (kWh usage from TED and TOU rate set from my Indigo schedules), I could do a simple multiplication, and the 3rd variable would be my current cost, which I could display in a custom control page. So something like this:
currentPowerNowTotal * currentElectricityRate = currentCost
I am having 2 challenges:
1. Getting the kWh usage (function is called PowerNow_Total in TED Plugin) into a variable that I can work with
2. Setting up an action (python script?) that multiplies the 2 variables to get my 3rd variable (currentCost)