I installed the Ecobee Suite with HPM. My Ecobee 4 has two extra sensors and so I ended up after installation with two sensor drivers (for the two sensors) and a thermostat driver. I played with the thermostat driver (In the device section) and found out that the setSchedule("home") would enable the comfort mode called home. I then wanted to write an app in Groovy that would programmatically do what I did under the device manually:
definition(
name: "ACcontrol",
namespace: "Hubi",
author: "Hubi",
description: "AC Demo To Execute setSchedule()",
category: "Convenience",
iconUrl: "",
iconX2Url: "",
iconX3Url: "",
oauth: [displayName: "HTML Endpoint", displayLink: "https://sharptools.io"])preferences() {
section("Sensors") {
input name: "EcobeeLivingRoom", type: "capability.sensor", title: "EcobeeLivingRoom (EcobeeSensor: Living Room (P5H6))"
input name: "EcobeeBedRoom", type: "capability.sensor", title: "EcobeeBedroom (EcobeeSensor: Bedroom (YHJV))"
input name: "EcobeeThermostat", type: "capability.thermostat", title: "EcobeeThermostat (EcobeeTherm)"
}
section("Logging") {
input name: "logEnable", type: "bool", title: "Enable logging?"
}
}def installed() {
updated()
}def updated() {
if (logEnable) log.debug "updated()"
unsubscribe()
subscribe(EcobeeLivingRoom, "home", EcobeeHandler)
subscribe(EcobeeBedRoom, "sensor", EcobeeHandler)// THE NEXT LINE OF CODE CAUSES THE FOLLOWING ERROR
//Expression [MethodCallExpression] is not allowed: EcobeeThermostat.setSchedule(home) at line number 33
EcobeeThermostat.setSchedule("home")
}def EcobeeHandler(evt) {
log.debeg "!!!!!!!!!!!!!!!!!!!!! Entered EcobeeHandler() !!!!!!!!!!!!!!!!!!!!!!!!"
}
When I installed this app I supply the correct selection for the "input". In all other apps in which I supply a method (setSchedule("home") in this case) to a device (EcobeeThermostat in this case) it will execute that method. What could I be doing wrong?
The following is a snippet from the device section:
Thanks