Skip to content

Commit b5b1f3b

Browse files
committed
Add example for feed suffix and multi light types
1 parent b70a029 commit b5b1f3b

File tree

4 files changed

+48
-2
lines changed

4 files changed

+48
-2
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"vendor": "Adafruit",
3+
"productURL": "https://www.adafruit.com/product/3779",
4+
"documentationURL": "https://learn.adafruit.com/adafruit-as7262-6-channel-visible-light-sensor",
5+
"displayName": "AS7262",
6+
"published": true,
7+
"i2cAddresses": [ "0x49" ],
8+
"subcomponents": [
9+
{
10+
"displayName": "Violet / Magenta",
11+
"sensorType": "light",
12+
"feedSuffix": "violet"
13+
},
14+
{
15+
"displayName": "Blue",
16+
"sensorType": "light",
17+
"feedSuffix": "blue"
18+
},
19+
{
20+
"displayName": "Green",
21+
"sensorType": "light",
22+
"feedSuffix": "green"
23+
},
24+
{
25+
"displayName": "Yellow",
26+
"sensorType": "light",
27+
"feedSuffix": "yellow"
28+
},
29+
{
30+
"displayName": "Orange",
31+
"sensorType": "light",
32+
"feedSuffix": "orange"
33+
},
34+
{
35+
"displayName": "Red",
36+
"sensorType": "light",
37+
"feedSuffix": "red"
38+
}
39+
]
40+
}

components/i2c/ltr303/definition.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
{
1414
"displayName": "Infrared",
15-
"sensorType": "raw"
15+
"sensorType": "light"
1616
}
1717
]
1818
}

components/i2c/ltr329/definition.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
{
1414
"displayName": "Infrared",
15-
"sensorType": "raw"
15+
"sensorType": "light"
1616
}
1717
]
1818
}

components/i2c/schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121
"minLength": 3,
2222
"maxLength": 24
2323
},
24+
"feedSuffix": {
25+
"description": "A unique string used to create the feed name for this sub-component, e.g.'red' suffix and type='light' would give ws-001-light-red.",
26+
"type": "string",
27+
"minLength": 1,
28+
"maxLength": 24
29+
},
2430
"sensorType": {
2531
"description": "One of the supported I2C sensor type strings (found in README).",
2632
"type": "string",

0 commit comments

Comments
 (0)