I don't know if this will help or not.... I do something similar, but instead of my stuff happening automatically, I get a pushover message letting me know that the AC is on and it's cooler outside than inside. (Then I can decide if I want to open a door/window/etc.). I have a similar set up for when it's hotter outside and the heater is on.
I use triggers.
1) Temp warmer outside.
2) Temp cooler outside.
Example of "Temp cooler outside"
Trigger:
Type: Variable Changed
Variable: outsideTempF changes
Condition: All
If device Thermostat Mode is Cool is true
if variable outsideTempF is less than variable InsideTempF
Actions:
disable trigger "Temp cooler outside" (auto-enable after 6 hours)
So the trigger doesn't keep firing all day with the temp difference.execute embedded python script:
- Code: Select all
theMode = indigo.variables[143562231].value
isCool = indigo.variables[285071090].value
isHeat = indigo.variables[1231095420].value
Temp = indigo.variables[796298002].value
Outside = indigo.variables[1927657870].value
TheMessage = '%s\n%s \n%s %s\n%s %s' % ("Cool Day", "AC is on and it's cooler outside.", "Inside Temp:", Temp, "Outside Temp:", Outside)
indigo.variable.updateValue(195713191, value=TheMessage)
#Send Pushover message
import requests
r = requests.post("https://api.pushover.net/1/messages.json", data = {
"token": "YOUR_TOKEN_NUMBER_HERE",
"user": "YOUR_PUSHOVER_USER_ID_HERE",
"message": TheMessage
})
print(r.text)
indigo.server.log(TheMessage)
Sorry I couldn't be more of a help. Maybe this will get you going in the right direction.