Hi there,
I checked various posts on the forum/ST documentation (…) but didn’t find if/how it’s possible to have a tile to call an action when I click on it. I am porting a Honeywell air purifier and I want a tile to switch between the fan speed. The tile circles the states as expected, but the actions methods are never called (no log.debug visible in the ST logs).
Here is my code, hopefully my mistake is so basic that someone sees it:
metadata {
definition (name: "Honeywell_HFP205B", namespace: "philippeportesppo", author: "Philippe PORTES")
{
attribute "fan_speed", "string"
}
preferences {
section {
input "internal_ip", "text", title: "Internal IP", required: true
input "internal_port", "text", title: "Internal Port (12345)", required: true
}
}
tiles(scale: 2) {
standardTile("fan", "device.fan", width: 2, height: 2) {
state "fan_off", label:'Off', action:"fan_germ", nextState:"fan_germ"
state "fan_germ", label:'Germ', action:"fan_general", nextState:"fan_general"
state "fan_general", label:'General Clean', action:"fan_allergen", nextState: "fan_allergen"
state "fan_allergen", label:'Allergen', action:"fan_turbo", nextState: "fan_turbo"
state "fan_turbo", label:'Turbo', action:"fan_off", nextState: "fan_off"
main("fan")
details(["fan"])
}
}
def fan_germ()
{
fan_speed='germ_on'
log.debug fan_speed
//refresh()
}
def fan_general()
{
fan_speed='general'
log.debug fan_speed
//refresh()
}
def fan_allergen()
{
fan_speed='allergen'
log.debug fan_speed
//refresh()
}
def fan_turbo()
{
fan_speed='turbo'
log.debug fan_speed
//refresh()
}
def fan_off()
{
fan_speed='off'
log.debug fan_speed
//refresh()
}
Thanks!