Skip to content

Commit

Permalink
Merge pull request #6096 from Smanar/legrand_7
Browse files Browse the repository at this point in the history
ADD DDF for Legrand 067755 Wireless Scenes Command
  • Loading branch information
manup committed Jun 4, 2022
2 parents 250e446 + 5dbd8d1 commit cfa68f0
Showing 1 changed file with 92 additions and 0 deletions.
92 changes: 92 additions & 0 deletions devices/legrand/wireless_scenes_command.json
@@ -0,0 +1,92 @@
{
"schema": "devcap1.schema.json",
"manufacturername": "Legrand",
"modelid": "Wireless Scenes Command",
"product": "Wireless Scenes Command",
"sleeper": true,
"status": "Gold",
"subdevices": [
{
"type": "$TYPE_SWITCH",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0005"
],
"items": [
{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion"
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "config/battery",
"awake": true,
"parse": {
"at": "0x0020",
"cl": "0x0001",
"eval": "const vmin = 20; const vmax = 30; let bat = Attr.val; if (bat > vmax) { bat = vmax; } else if (bat < vmin) { bat = vmin; } bat = ((bat - vmin) / (vmax - vmin)) * 100; if (bat > 100) { bat = 100; } else if (bat <= 0) { bat = 1; } Item.val = bat;"
},
"default": 0
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/buttonevent",
"awake": true,
"parse": {
"cl": "0x0005",
"cmd": "0x05",
"eval": "Item.val = (ZclFrame.at(0) + 18) * -1000 + 2"
}
},
{
"name": "state/lastupdated"
}
]
}
],
"bindings": [
{
"bind": "unicast",
"src.ep": 1,
"cl": "0x0001",
"report": [
{
"at": "0x0020",
"dt": "0x20",
"min": 3600,
"max": 43200,
"change": "0x00000001"
}
]
}
]
}

0 comments on commit cfa68f0

Please sign in to comment.