Skip to content

Commit a5f3b0e

Browse files
authored
DDF for innr PL 110 and innr UC 110 (dresden-elektronik#6854)
1 parent 3084108 commit a5f3b0e

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

devices/innr/xx_110.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"schema": "devcap1.schema.json",
3+
"manufacturername": [
4+
"innr",
5+
"innr"
6+
],
7+
"modelid": [
8+
"PL 110",
9+
"UC 110"
10+
],
11+
"product": "innr Puck Light and innr Under Cabinet light",
12+
"sleeper": false,
13+
"status": "Gold",
14+
"subdevices": [
15+
{
16+
"type": "$TYPE_DIMMABLE_LIGHT",
17+
"restapi": "/lights",
18+
"uuid": [
19+
"$address.ext",
20+
"0x01"
21+
],
22+
"items": [
23+
{
24+
"name": "attr/id"
25+
},
26+
{
27+
"name": "attr/lastannounced"
28+
},
29+
{
30+
"name": "attr/lastseen"
31+
},
32+
{
33+
"name": "attr/manufacturername"
34+
},
35+
{
36+
"name": "attr/modelid"
37+
},
38+
{
39+
"name": "attr/name"
40+
},
41+
{
42+
"name": "attr/swversion"
43+
},
44+
{
45+
"name": "attr/type"
46+
},
47+
{
48+
"name": "attr/uniqueid"
49+
},
50+
{
51+
"name": "state/alert"
52+
},
53+
{
54+
"name": "config/bri/on_level"
55+
},
56+
{
57+
"name": "config/bri/onoff_transitiontime"
58+
},
59+
{
60+
"name": "state/bri",
61+
"refresh.interval": 5
62+
},
63+
{
64+
"name": "state/on",
65+
"refresh.interval": 5
66+
},
67+
{
68+
"name": "state/reachable"
69+
}
70+
]
71+
}
72+
]
73+
}

rest_lights.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ bool DeRestPluginPrivate::lightToMap(const ApiRequest &req, const LightNode *lig
325325
else if (rid.suffix == RConfigBriMax) { configBri["max"] = item->toNumber(); }
326326
else if (rid.suffix == RConfigBriMin) { configBri["min"] = item->toNumber(); }
327327
else if (rid.suffix == RConfigBriOnLevel) { configBri["on_level"] = item->toNumber() == 0xFF ? QVariant(QLatin1String("previous")) : item->toNumber(); }
328+
else if (rid.suffix == RConfigBriOnOffTransitiontime) { configBri["onoff_transitiontime"] = item->toNumber(); }
328329
else if (rid.suffix == RConfigBriMin) { configBri["onoff_transition_time"] = item->toNumber(); }
329330
else if (rid.suffix == RConfigBriStartup) { configBri["startup"] = item->toNumber() == 0xFF ? QVariant(QLatin1String("previous")) : item->toNumber(); }
330331
else if (rid.suffix == RConfigColorCtStartup) { configColorCt["startup"] = item->toNumber() == 0xFFFF ? QVariant(QLatin1String("previous")) : item->toNumber(); }
@@ -4010,6 +4011,7 @@ void DeRestPluginPrivate::handleLightEvent(const Event &e)
40104011
else if (rid.suffix == RConfigBriMax) { configBri["max"] = item->toNumber(); }
40114012
else if (rid.suffix == RConfigBriMin) { configBri["min"] = item->toNumber(); }
40124013
else if (rid.suffix == RConfigBriOnLevel) { configBri["on_level"] = item->toNumber() == 0xFF ? QVariant(QLatin1String("previous")) : item->toNumber(); }
4014+
else if (rid.suffix == RConfigBriOnOffTransitiontime) { configBri["onoff_transitiontime"] = item->toNumber(); }
40134015
else if (rid.suffix == RConfigBriMin) { configBri["onoff_transition_time"] = item->toNumber(); }
40144016
else if (rid.suffix == RConfigBriStartup) { configBri["startup"] = item->toNumber() == 0xFF ? QVariant(QLatin1String("previous")) : item->toNumber(); }
40154017
else if (rid.suffix == RConfigColorCtStartup) { configColorCt["startup"] = item->toNumber() == 0xFFFF ? QVariant(QLatin1String("previous")) : item->toNumber(); }

0 commit comments

Comments
 (0)