Skip to content

Instantly share code, notes, and snippets.

if (health.power.charging_status == ‘charging’) & (health.power.battery > 30) {
return result (corresponding to the predicate)
}else if (check for another rule if present in the list of predicate){
return result (corresponding ot the predicate)
}
else {
  return default_rule
}
{
"transmission_rules": {
"predicates": [{
"and,eq,health.power.charging_status,charging,gte,health.power.battery,30": {
"result": {
"ttl": -1,
"flush": false,
"batch_size": 50,
"batch_duration": 5,
"preferred_channel": "http"