Give this one a try. Untested, but probably works or is really close.
- Code: Select all
varHouseValveON = indigo.variables["Water_Test_HouseValve_ON"]
varHouseValveOFF = indigo.variables["Water_Test_HouseValve_OFF"]
varHouseValveSuccess = indigo.variables["Water_Test_HouseValve_Success"]
varSuccessTimestamp = indigo.variables["Water_Test_Success_TimeStamp"]
varRfxOutsideTimestamp = indigo.variables["RFX_Outside_Temp_Obs_Time"]
if varHouseValveON.getValue(str) == "true" and varHouseValveOFF.getValue(str) == "true":
indigo.variable.updateValue(varHouseValveSuccess, "true")
indigo.variable.updateValue(varHouseValveON, "")
indigo.variable.updateValue(varHouseValveOFF, "")
indigo.variable.updateValue(varSuccessTimestamp, varRfxOutsideTimestamp.getValue(str))
indigo.server.log(u"House Water Valve working correctly")
else:
indigo.actionGroups.execute("Water Valve House Test Failed")
indigo.variable.updateValue(varHouseValveSuccess, "false")
indigo.server.log(u"House Water Valve not executing. Check that knob on side is set to AUTO. ReRun from basement and ensure valve is turning. If not, check Phidgets box and relays.")