Question about the capability of "ShockSensor"

Hi, All:
I find that capability on the hubitat’ document. And I can not find any about it in SmartThings. But when I used it in my DTH, no error is reported! So I am very confused, does this capability exist or supported by ST?

Yes it exists but its use is deprecated so I’d be surprised if the app supports it in the UI or Automations.

{
    "id": "shockSensor",
    "version": 1,
    "status": "deprecated",
    "name": "Shock Sensor",
    "attributes": {
        "shock": {
            "schema": {
                "type": "object",
                "properties": {
                    "value": {
                        "type": "string",
                        "enum": [
                            "clear",
                            "detected"
                        ]
                    }
                },
                "additionalProperties": false,
                "required": [
                    "value"
                ]
            },
            "enumCommands": []
        }
    },
    "commands": []
}

I’m not sure whether to use it or not, because I read this from the design book:


I won’t be sure until I get the product.

Usually when SmartThings deprecate a capability it means they introduced a capability that will replace it. While deprecated capabilities work, they are only intended for back compatibility and they aren’t supported for new usage. So you need a replacement.

I would imagine that Acceleration Sensor is the intended replacement, though I might have missed one.

It really depends on what the device reports for the Shock Sensor. If it isn’t a basic active/inactive pair then you will probably need a custom capability.

2 Likes