Dave
That could be done but probably through a little python code in a schedule action that runs say every min. The main issue is that there isn't an AVERAGE function in the action conditions but it wouldn't be too hard to add a Server/Execute Action
The code would probably do something like this:
Read temperature from Device 1 into a python variable
Read temperature from Device 2 into a python variable
Read temperature from Device 3 into a python variable
Average the temperatures
Check if something needs to happen
In python it would look like:
- Code: Select all
import indigo
# Get devices
t1 = indigo.devices[1632080987] # "Living Room Temperature"
t2 = indigo.devices[1167287922] # "Master Bedroom Temperature"
t3 = indigo.devices[476678264] # "Landing Temperature"
# Extract information on Temperatures
Temp1 = t1.displayStateValRaw
Temp2 = t2.displayStateValRaw
Temp3 = t3.displayStateValRaw
# Calculate average
tempAverage = round((Temp1+Temp2+Temp3)/3.0,1)
# Show the results in the indigo log as an example
indigo.server.log('Temperatures:'+str(Temp1)+' '+str(Temp2)+' '+str(Temp3))
indigo.server.log('Average:'+str(tempAverage))
# Now act
if tempAverage>18.0:
indigo.server.log('Temperature too high - switching on cooling')
elif tempAverage<15.0:
indigo.server.log('Temperature too low - switching off cooling')
Here's an example of the code in place in a New Schedule Page...
- Create New Schedule Dialog
- Screen Shot 2016-12-31 at 15.21.58.png (98.97 KiB) Viewed 2334 times
I'm not sure exactly what you want to do but if you let me know I'll try to come up with an action that changes your NEST when needed (and will probably be more elegant than this solution)
Regards
Mike