Hello,
thanks for the great plugin. Could you please help me with the syntax? My Carbon Dioxide sensor only returns a numeric level value. I am trying to convert it to Homekit values (ABNORMAL/NORMAL) by a setting a condition with a treshold to use the "detected" state, but apparently, my syntax is not correct:
Hello, thanks for the great plugin. Could you please help me with the syntax? My Carbon Dioxide sensor only returns a numeric level value. I am trying to convert it to Homekit values (ABNORMAL/NORMAL) by a setting a condition with a treshold to use the "detected" state, but apparently, my syntax is not correct:
"topics": {
"getCarbonDioxideDetected": {
"topic": "tele/tasmota/SENSOR$.T67XX.CarbonDioxide",
"apply": "return if (message > 1000) {return 'ABNORMAL';} else {return 'NORMAL';};"
},
"getCarbonDioxideLevel": "tele/tasmota/SENSOR$.T67XX.CarbonDioxide"
},
Many thanks, Jakub