{
  "schema": "devcap1.schema.json",
  "manufacturername": [
    "$MF_PHILIPS",
    "$MF_SIGNIFY"
  ],
  "modelid": [
    "RWL022",
    "RWL022"
  ],
  "product": "Hue dimmer switch (2021)",
  "status": "Gold",
  "sleeper": true,
  "subdevices": [
    {
      "type": "$TYPE_SWITCH",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0xfc00"
      ],
      "fingerprint": {
        "endpoint": "0x01",
        "profile": "0x0104",
        "device": "0x0830",
        "in": [
          "0x0000",
          "0x0001",
          "0x0003",
          "0xfc00"
        ],
        "out": [
          "0x0005",
          "0x0006",
          "0x0008",
          "0x0019"
        ]
      },
      "buttons": {
        "1": {
          "name": "On/Off"
        },
        "2": {
          "name": "DimUp"
        },
        "3": {
          "name": "DimDown"
        },
        "4": {
          "name": "Hue"
        }
      },
      "buttonevents": {
        "1000": {
          "action": "PRESS",
          "button": 1
        },
        "1001": {
          "action": "HOLD",
          "button": 1
        },
        "1002": {
          "action": "SHORT_RELEASE",
          "button": 1
        },
        "1003": {
          "action": "LONG_RELEASE",
          "button": 1
        },
        "2000": {
          "action": "PRESS",
          "button": 2
        },
        "2001": {
          "action": "HOLD",
          "button": 2
        },
        "2002": {
          "action": "SHORT_RELEASE",
          "button": 2
        },
        "2003": {
          "action": "LONG_RELEASE",
          "button": 2
        },
        "3000": {
          "action": "PRESS",
          "button": 3
        },
        "3001": {
          "action": "HOLD",
          "button": 3
        },
        "3002": {
          "action": "SHORT_RELEASE",
          "button": 3
        },
        "3003": {
          "action": "LONG_RELEASE",
          "button": 3
        },
        "4000": {
          "action": "PRESS",
          "button": 4
        },
        "4001": {
          "action": "HOLD",
          "button": 4
        },
        "4002": {
          "action": "SHORT_RELEASE",
          "button": 4
        },
        "4003": {
          "action": "LONG_RELEASE",
          "button": 4
        }
      },
      "items": [
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/productname",
          "static": "Hue dimmer switch"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/allowtouchlink",
          "read": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0x0000",
            "mf": "0x100b",
            "at": "0x0031"
          },
          "parse": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0x0000",
            "mf": "0x100b",
            "at": "0x0031",
            "eval": "Item.val = Attr.val != 0x000b"
          },
          "write": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0x0000",
            "mf": "0x100b",
            "at": "0x0031",
            "dt": "0x19",
            "eval": "Item.val ? 0x0000 : 0x000b"
          },
          "default": false,
          "refresh.interval": 84000
        },
        {
          "name": "config/battery",
          "parse": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0x0001",
            "at": "0x0021",
            "eval": "Item.val = Attr.val / 2"
          },
          "awake": true
        },
        {
          "name": "config/group",
          "default": "auto"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/buttonevent",
          "parse": {
            "fn": "zcl:cmd",
            "ep": 1,
            "cl": "0xfc00",
            "mf": "0x100b",
            "cmd": "0x00",
            "script": "fc00_buttonevent.js"
          },
          "awake": true
        },
        {
          "name": "state/eventduration"
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0xfc00"
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0001",
      "report": [
        {
          "at": "0x0021",
          "dt": "0x20",
          "min": 300,
          "max": 300,
          "change": "0x01"
        }
      ]
    },
    {
      "bind": "groupcast",
      "src.ep": 1,
      "cl": "0x0006",
      "config.group": 0
    },
    {
      "bind": "groupcast",
      "src.ep": 1,
      "cl": "0x0008",
      "config.group": 0
    }
  ]
}
