Exposes #

Zigbee2MQTT exposes the device capabilities through the exposes property in zigbee2mqtt/bridge/devices. The possible exposes are documented here.

There are two types of exposes:

Both types will always have a type property. The generic types (except composite) will always have an access property and an optional description property. All generic types will always have a name property indicating the context. All generic types will always have a property type indicating where the value is exposed on, usually this is equal to the name but in case when the endpoint is defined it is name_endpoint. The specific and the generic composite type will always have a features property, this is an array containing the generic exposes types. Optionally both types can have a property endpoint, indicating the device exposes this capability on a specific endpoint.

Access #

The access property is a 3-bit bitmask.

Examples:

Generic #

Binary #

Indicates a device exposes a binary value. Always has value_on and value_off which indicates how to interpet the value. Optionally has a value_toggle which can be send to toggle the value.

Examples:

Numeric #

Indicates a device exposes a numeric value. Optionally has value_max, value_min, value_step, unit and presets. The presets defines values which have a special interpetation.

Examples:

Enum #

Indicates a device exposes an enum value. Always has values indicating all possible values.

Examples:

Text #

Indicates a device exposes a textual value.

Examples:

Composite #

Composite combines the above generic types in the features array. Unlike other generic types, it does not have the access property since the access is defined per feature.

Example:

{
    "type":"composite",
    "name":"color_xy",
    "property":"color",
    "features": [
        {"type":"numeric","name":"x","property":"x","access":7},
        {"type":"numeric","name":"y","property":"y","access":7},
    ]
}

Specific #

Light #

Indicates a device exposes a light, possible features are state, brightness, color_temp, color_xy and color_hs.

Example:

{
    "type": "light",
    "features": [
        {"type":"binary","name":"state","property":"state","value_on":"ON","value_off":"OFF","value_toggle":"TOGGLE","access":7},
        {"type":"numeric","name":"brightness","property":"brightness","value_min":0,"value_max":254,"access":7},
        {"type":"numeric","name":"color_temp","property":"color_temp","access":7},
        {
            "type":"composite",
            "name":"color_xy",
            "property":"color",
            "features": [
                {"type":"numeric","name":"x","property":"x","access":7},
                {"type":"numeric","name":"y","property":"y","access":7}
            ]
        },
        {
            "type":"composite",
            "name":"color_hs",
            "property":"color",
            "features": [
                {"type":"numeric","name":"hue","property":"hue","access":7},
                {"type":"numeric","name":"saturation","propertsaturation":"saturation","access":7}
            ]
        }
    ]
}

Switch #

Indicates a device exposes a switch.

Example:

{
    "type": "switch",
    "features": [
        {"type":"binary","name":"state","property":"state","value_on":"ON","value_off":"OFF","value_toggle":"TOGGLE","access":7}
    ]
}

Fan #

Indicates a device exposes a fan. Possible features are state and mode.

Example:

{
    "type": "fan",
    "features": [
        {"type":"binary","name":"state","property":"fan_state","value_on":"ON","value_off":"OFF","access":7},
        {"type":"enum","name":"mode","property":"fan_mode","values":["off", "low", "medium", "high", "on", "auto", "smart"],"access":7}
    ]
}

Cover #

Indicates a device exposes a cover. Possible features are state, position and tilt.

Example:

{
    "type": "cover",
    "features": [
        {"type":"binary","name":"state","property":"state","value_on":"OPEN","value_off":"CLOSE","access":7},
        {"type":"numeric","name":"position","property":"position","value_min":0,"value_max":100,"access":7},
        {"type":"numeric","name":"tilt","property":"tilt","value_min":0,"value_max":100,"access":7}
    ]
}

Lock #

Indicates a device exposes a lock. Possible features are state and lock_state.

Example:

{
    "type": "lock",
    "features": [
        {"type":"binary","name":"state","property":"state","value_on":"LOCK","value_off":"UNLOCK","access":7}
        {"type":"enum","name":"lock_state","property":"lock_state","values":["not_fully_locked","locked","unlocked"],"access":1}
    ]
}

Climate #

Indicates this device exposes climate functionallity.

Example:

{
    "type": "climate",
    "features": [
        {"type":"numeric","name":"occupied_heating_setpoint","property":"occupied_heating_setpoint","value_min":7,"value_max":30,"value_step": 0.5,"access":7,"unit":"°C"},
        {"type":"numeric","name":"occupied_cooling_setpoint","property":"occupied_heating_setpoint","value_min":7,"value_max":30,"value_step": 0.5,"access":7,"unit":"°C"},
        {"type":"numeric","name":"local_temperature","property":"local_temperature","access":3,"unit":"°C"},
        {"type":"enum","name":"system_mode","property":"system_mode","values":["off", "auto", "heat", "cool"],"access":7},
        {"type":"enum","name":"preset","property":"preset","values":["hold", "program"],"access":7},
        {"type":"enum","name":"running_state","property":"running_state","values":["idle", "heat", "cool"],"access":3},
        {"type":"enum","name":"mode","property":"fan_mode","values":["off", "low", "medium", "high", "on", "auto", "smart"],"access":7},
        {"type":"binary","name":"away_mode","property":"away_mode","value_on":"ON","value_off":"OFF","access":7},
    ]
}