Hello Folks,
I am trying to operate a switch ( humidifier ) based on the heating state of thermostat.
The events thermostatOperatingState is not trapped. I am not sure if that is even a valid event. I guessed looking at some documentation and I am not sure if this is correct.
Can someone help me correct the mistake.
Thanks,
Mohit
/---------------------------------------------------------------------------------/
preferences {
section("Choose a temperature sensor… "){
input “sensor”, “capability.thermostat”, title: “Sensor”
}
section("Select the heater or air conditioner outlet(s)… "){
input “outlets”, “capability.switch”, title: “Outlets”, multiple: true
}
}
thermostatMode events fire when I change from heat to cool and vice versa… but then I was looking for switching something on when the heat turns on after the temperature has fallen below the set level in the thermostat.
looking at http://graph.api.smartthings.com/ide/doc/capabilities I think thermostatOperatingState is the correct event type to monitor but that does not seem to fire at all. I have tested both with simulator thermostat and a real one.
is this a bug ? I have not written many Apps for smartthings so it could be a silly mistake I am making somewhere.
Actually my code was correct for most part. I made some mistake with evt.Value where V is in uppercase. After correcting that the app works fine. I see that at times the event firing can take some time but it works !