Custom Capability and CLI Developer Preview

I suspect that a lot of the problem is that things like custom capabilities, capability presentations and device configs are just as novel to the ‘new’ environment as they are to the remaining legacy systems.

When creating the capability, is there a way to go back if you accidentally select “Add an attribute” when you meant to select “Add a command”? I don’t want to have to restart creating my capability again!

Hi, there’s no command to go back one step, but there are other alternatives:

  1. Create manually the custom capability. These are the steps to follow:
    a. Generate a JSON file that contains the configuration
    b. Use the command below to create it
smartthings capabilities:create -j -i customCapability.json
  1. Save the capability with that extra argument and edit it. To do so:
    a. Get the capability definition
    b. Copy it into a file and delete that attribute
    c. Update the configuration using this command:
smartthings capabilities:update capabilityID 1 -j -i customCapability.json

Just as a reminder, only one attribute per custom capability is supported for display.

Thank you!

1 Like

nah … they are on the original agile … sprint duration is 9 months :wink:

5 Likes

@nayelyz Looking for your help once again. I know we spoke earlier about isComponent=true child devices, but today’s question is about the isComponent=false variety. The child is displayed on the dashboard but remains in the offline state, everything grayed out.

I have no problem creating the child device. From the parent, I can sendEvent to the child for attribute “switch”. I know this is working because the I see it in the child event log and if the parent interrogates the child, the new value is returned. All Good. For the child DTH I created a deviceConfig listing just the switch capability. After creating this I added the vid: into the child and saved it. The child shows the controls you would expect for a switch capability, but the switch state shows the cloud icon instead of the on/off state. I will include the child DTH code and the device presentation.

/**

  • Switch Child Device

*/
metadata {
definition (name: “Switch Child Device”, namespace: “futuredance12594”, “vid”: “e92cc1cb-5184-3238-9f49-8703c5d748be”, “mnmn”: “SmartThingsCommunity”) {
capability “Switch”
capability “Refresh”
capability “Configuration”
}
preferences {
input “poolSpa1”, “enum”, title: “Pool or Spa”,
options:[[0:“Pool”],
[1:“Spa”],
[2:“Both”]]
}
}

def updated() {
log.debug("----- updated()")
sendEvent(name: “switch”, value: “off”, displayed: true, descriptionText:“Initial Value”)

}

def List configure() {
log.debug("----- configure()")
sendEvent(name: “switch”, value: “on”, displayed: true, descriptionText:“Initial Value”)

}

void on() {
log.debug("----- on()")
parent.childOn(device.deviceNetworkId)
}

void off() {
log.debug("----- off()")
parent.childOff(device.deviceNetworkId)
}

void refresh() {
log.debug("----- refresh()")
parent.childRefresh(device.deviceNetworkId)
}

and the Device config JSON:

"dashboard": {
    "states": [
        {
            "component": "main",
            "capability": "switch",
            "version": 1,
            "values": [],
            "patch": []
        }
    ],
    "actions": [
        {
            "component": "main",
            "capability": "switch",
            "version": 1,
            "values": [],
            "patch": []
        }
    ]
},
"detailView": [
    {
        "component": "main",
        "capability": "switch",
        "version": 1,
        "values": [],
        "patch": []
    }
],
"automation": {
    "conditions": [
        {
            "component": "main",
            "capability": "switch",
            "version": 1,
            "values": [],
            "patch": []
        }
    ],
    "actions": [
        {
            "component": "main",
            "capability": "switch",
            "version": 1,
            "values": [],
            "patch": []
        }
    ]
},
"type": "dth"

}

The preferences in the child are merely to enable the Settings menu.

and the parent’s child creation:
addChildDevice(namespace=“futuredance12594”,DTH Name=“Switch Child Device”, dni=“37-ep1”, hubId=null,properties=[completedSetup: true, label: “Pool Control - Switch 1”,isComponent: false, componentName: “ep1”, componentLabel: “Pool Control - Switch 1”]

This worked fine in the Legacy App. I’ve done all the usual cache reset tricks and waited days, but no change. I have another child which uses the thermostat capability which has the same issue, correct controls for a thermostat capability, but all disabled. Hopefully the same fix will apply to both.

Any ideas?

Keith

I don’t know if it could cause your problem, but it seems contradictory for something that is not a component to be assigned a component name and label.

Obviously it would make sense for something that isn’t a component to ignore that information but you never know.

@orangebucket I think the name of this parameter has always been a little deceptive. It isn’t really whether or not the child is a component at all, it really indicates whether the child’s presentation should appear within the presentation of the parent (true) or the child appears as a completely separate presentation with its own dashboard tile(false). The latter is the desired condition here, and the compoenentLabel is actually the name that appears on the tile (both old and new app).

OK, that is not how I read it at all. Regardless of that, this thread might be of interest …

Hello,

I try to send this device config:

   {
"dashboard": {
    "states": [
        {
            "component": "main",
            "capability": "connectprogram52293.aqi",
            "version": 1,
            "values": [],
            "patch": []
        }
    ],
    "actions": [
        {
            "component": "main",
            "capability": "temperatureMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "relativeHumidityMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "sensor",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "healthCheck",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "dustSensor",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "carbonMonoxideMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "fineDustSensor",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.ozoneMeasure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.nitrogenDioxideMeasure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.sufurDioxideMeasure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.station",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.upate",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.windspeed",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.atmpressure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.aqi",
            "version": 1,
            "values": [],
            "patch": []
        }
    ]
},
"detailView": [
    {
        "component": "main",
        "capability": "connectprogram52293.aqi",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "connectprogram52293.station",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "dustSensor",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "fineDustSensor",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "connectprogram52293.ozoneMeasure",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "connectprogram52293.nitrogenDioxideMeasure",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "connectprogram52293.sufurDioxideMeasure",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "carbonMonoxideMeasurement",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "temperatureMeasurement",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "relativeHumidityMeasurement",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "connectprogram52293.atmpressure",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "connectprogram52293.windspeed",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "connectprogram52293.upate",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "sensor",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "healthCheck",
        "version": 1,
        "values": [],
        "patch": []
    }
],
"automation": {
    "conditions": [
        {
            "component": "main",
            "capability": "temperatureMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "relativeHumidityMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "sensor",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "healthCheck",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "dustSensor",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "carbonMonoxideMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "fineDustSensor",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.ozoneMeasure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.nitrogenDioxideMeasure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.sufurDioxideMeasure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.station",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.upate",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.windspeed",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.atmpressure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.aqi",
            "version": 1,
            "values": [],
            "patch": []
        }
    ],
    "actions": [
        {
            "component": "main",
            "capability": "temperatureMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "relativeHumidityMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "sensor",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "healthCheck",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "dustSensor",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "carbonMonoxideMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "fineDustSensor",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.ozoneMeasure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.nitrogenDioxideMeasure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.sufurDioxideMeasure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.station",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.upate",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.windspeed",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.atmpressure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.aqi",
            "version": 1,
            "values": [],
            "patch": []
        }
    ]
},
"type": "dth"

}

But I am receiving this answer:

{
"dashboard": {
    "states": [
        {
            "component": "main",
            "capability": "connectprogram52293.aqi",
            "version": 1,
            "values": [],
            "patch": []
        }
    ],
    "actions": [
        {
            "component": "main",
            "capability": "connectprogram52293.aqi",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.station",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "dustSensor",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "fineDustSensor",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.ozoneMeasure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.nitrogenDioxideMeasure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.sufurDioxideMeasure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "carbonMonoxideMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "temperatureMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "relativeHumidityMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.atmpressure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.windspeed",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.upate",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "sensor",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "healthCheck",
            "version": 1,
            "values": [],
            "patch": []
        }
    ]
},
"detailView": [
    {
        "component": "main",
        "capability": "temperatureMeasurement",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "relativeHumidityMeasurement",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "sensor",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "healthCheck",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "connectprogram52293.aqi",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "dustSensor",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "carbonMonoxideMeasurement",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "fineDustSensor",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "connectprogram52293.ozoneMeasure",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "connectprogram52293.nitrogenDioxideMeasure",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "connectprogram52293.sufurDioxideMeasure",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "connectprogram52293.station",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "connectprogram52293.upate",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "connectprogram52293.windspeed",
        "version": 1,
        "values": [],
        "patch": []
    },
    {
        "component": "main",
        "capability": "connectprogram52293.atmpressure",
        "version": 1,
        "values": [],
        "patch": []
    }
],
"automation": {
    "conditions": [
        {
            "component": "main",
            "capability": "temperatureMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "relativeHumidityMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "sensor",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "healthCheck",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.aqi",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "dustSensor",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "carbonMonoxideMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "fineDustSensor",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.ozoneMeasure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.nitrogenDioxideMeasure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.sufurDioxideMeasure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.station",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.upate",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.windspeed",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.atmpressure",
            "version": 1,
            "values": [],
            "patch": []
        }
    ],
    "actions": [
        {
            "component": "main",
            "capability": "temperatureMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "relativeHumidityMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "sensor",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "healthCheck",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.aqi",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "dustSensor",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "carbonMonoxideMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "fineDustSensor",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.ozoneMeasure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.nitrogenDioxideMeasure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.sufurDioxideMeasure",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.station",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.upate",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.windspeed",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "connectprogram52293.atmpressure",
            "version": 1,
            "values": [],
            "patch": []
        }
    ]
},
"type": "dth",
"presentationId": "864a71c6-f94a-3eb9-8b84-f4939b79f165",
"manufacturerName": "SmartThingsCommunity",
"vid": "864a71c6-f94a-3eb9-8b84-f4939b79f165",
"mnmn": "SmartThingsCommunity",
"version": "0.0.1"

}

In the Details section CLI is changing the order that I have put in the cards.

Any suggestion?

How can I change the alternatives to fit a range of values?

{
"dashboard": {
    "states": [
        {
            "label": "{{aqiLevel.value}} {{aqiLevel.unit}}",
            "alternatives": [
                {
                    "key": "0",
                    "value": "n/a",
                    "type": "inactive"
                },
                {
                    "key": "1",
                    "value": "Good",
                    "type": "active"
                },
                {
                    "key": "51",
                    "value": "Moderate",
                    "type": "active"
                },
                {
                    "key": "101",
                    "value": "Unhealthy for Sensitive Groups",
                    "type": "active"
                },
                {
                    "key": "151",
                    "value": "Unhealthy",
                    "type": "active"
                },
                {
                    "key": "201",
                    "value": "Very Unhealthy",
                    "type": "active"
                },
                {
                    "key": "301",
                    "value": "Hazardous",
                    "type": "active"
                }
            ]
        }
    ],
    "actions": [],
    "basicPlus": []
},
"detailView": [
    {
        "label": "Air Quality Index",
        "displayType": "slider",
        "slider": {
            "range": [
                0,
                500
            ],
            "unit": "aqiLevel.unit",
            "value": "aqiLevel.value",
            "valueType": "number"
        }
    }
],
"automation": {
    "conditions": [
        {
            "label": "Air Quality Index",
            "displayType": "numberField",
            "numberField": {
                "value": "aqiLevel.value",
                "valueType": "number",
                "unit": "aqiLevel.unit",
                "range": [
                    0,
                    500
                ]
            }
        }
    ],
    "actions": []
},
"id": "connectprogram52293.aqi",
"version": 1

}

I would like to get for example value: good between the value keys ​​1 and 50.

At the Dashboard > Actions section, you have all the capabilities included. I suggest you only leave in this section a capability that has this part configured on its presentation. If you don’t need to control any capability from the Dashboard View, you can leave that section empty in the device-config.

Up to now, the alternatives cannot be configured based on a certain range. What you can do is having another capability that changes to Good when aqi changes to a value between 1 and 50. You can use the Automations in the mobile app or the Rules API.

1 Like

Thank you Nayelyz,

The problem was in the Dashboard > Actions section as you said.

As you recommended me, I have created a new capability and it works very well, I finally have changed the values with groovy in the DTH.

I tried with the api rules but the new webcore doesn’t show the commands created with the capability. However they are accessible from the “classic” webcore and the great new automations. But in the automations it would be great if there was a distinction between “is” and “changes to”.

Thanks again.

Hi, anytime!

Can you give more details about this, please?

One is a condition, the other is a trigger.

In the app automatic actions there is no option tu use triggers only conditions.

Nayely, ‘is’ and ‘changes to’ are terms used in webCoRE. A condition like ‘if motion is active’ considers what the current value of an attribute is, which means either the value from the current event if appropriate, or the current value from the old Graph API. A condition like ‘if motion changes to active’ is more specifically known as a ‘trigger’ in webCoRE and considers only the event that is being handled (in this case comparing the current event to the last sighting of it to determine if there is a change). If any triggers exist only those are used for deciding what attributes to subscribe to. This means that with webCoRE you can be very selective with what actually makes the piston (automation) run, and you can differentiate between events and status, for example between being at home, and having just arrived at home.

Automations, in the mobile app sense, seem to only deal with the current value of attributes. So although you see may see terms like arrived, opened, turned on that are suggestive of particular events having just happened (not present → present, closed → open, off → on), in reality the tests are for the present, open and closed attribute values at the time the automation runs. As well as being confusing when actions are used to describe states, it also means that you have to jump through hoops if you are only interested in e.g. not presentpresent.

Many users suggest that the Routines in the Classic app actually could correctly identify an arrival, for example, and so consider that they have lost functionality in the migration to Automations. My recollection is that Routines had exactly the same problem that Automations do but perhaps I just used them differently.

3 Likes

Precisely the reason I don’t use “Automations” in the One App, because compared to what’s been available, they are illogical.

Hello,

With this presentation update:

{
"dashboard": {
    "states": [
        {
            "label": "{{pmgAqiLevel.value}} {{pmgAqiLevel.unit}}"
        }
    ],
    "actions": [],
    "basicPlus": []
},
"detailView": [
    {
        "label": "Dust PM 10 Level",
        "displayType": "slider",
        "slider": {
            "range": [
                0,
                500
            ],
            "step": 1,
            "command": "setPmgAqiLevel",
            "unit": "pmgAqiLevel.unit",
            "value": "pmgAqiLevel.value"
        }
    }
],
"automation": {
    "conditions": [
        {
        "label": "Dust PM 10 Level",
        "displayType": "slider",
        "slider": {
            "range": [
                0,
                500
            ],
            "step": 1,
            "command": "setPmgAqiLevel",
            "unit": "pmgAqiLevel.unit",
            "value": "pmgAqiLevel.value"
        }
    }
    ],
    "actions": [
        {
        "label": "Dust PM 10 Level",
        "displayType": "slider",
        "slider": {
            "range": [
                0,
                500
            ],
            "step": 1,
            "command": "setPmgAqiLevel",
            "unit": "pmgAqiLevel.unit",
            "value": "pmgAqiLevel.value"
        }
    }
    ]
},
"id": "connectprogram52293.pm10aqi",
"version": 1

}

I get this in conditions and actions in the app (it is the fourth capability in the image, the second Air Quality Index:

The label in the DTH is updated two hours after the update in my computer. Labels in conditions and actions simply desn’t update. Does something work in this difficult new method of working? I am so tired and thinking to find new horizonts in Hubitat.

1 Like

Except when they do. I can’t quite work out the caching now.

Capability presentation updates now (and since a few months ago) just appear in the app whether you like it or not, eventually. I first thought they were bypassing device presentations but recent behaviour leads me to think it is just that there is a cache period before the device presentations are updated. I can’t see any way of busting that cache except creating a new device presentation as was always the case.

Device presentations for a device are clearly still cached by the app. However it is no longer possible to break that cache by updating device details or clearing the cache, because …

For the last few months there seems to have been yet another cache which prevents updates to the presentation ID being seen by devices straight away.

It is getting very confusing and I suspect most of the above is wrong.

One particularly confusing example was that I made two changes to a capability presentation ten minutes apart. When the changes made it to the UI hours later it was only the first change.

2 Likes