add tvoc sensorType for i2c

This commit is contained in:
Loren Norman 2023-07-13 13:42:16 -04:00
parent 66e551dfa2
commit 22364c13f5
3 changed files with 7 additions and 2 deletions

View file

@ -158,3 +158,4 @@ Possible values for an I2C component's subcomponents' `sensorType` field:
- "lux"
- "eco2"
- "unitless-percent"
- "tvoc"

View file

@ -5,7 +5,7 @@
"$defs": {
"subcomponent": {
"type": ["string", "object"],
"pattern": "^(unspecified|accelerometer|magnetic-field|orientation|gyroscope|light|pressure|proximity|gravity|acceleration|rotation|humidity|ambient-temp|object-temp|voltage|current|color|raw|pm10-std|pm25-std|pm100-std|pm10-env|pm25-env|pm100-env|co2|gas-resistance|altitude|lux|eco2|unitless-percent|ambient-temp-fahrenheit|object-temp-fahrenheit|voc-index|nox-index)$",
"pattern": "^(unspecified|accelerometer|magnetic-field|orientation|gyroscope|light|pressure|proximity|gravity|acceleration|rotation|humidity|ambient-temp|object-temp|voltage|current|color|raw|pm10-std|pm25-std|pm100-std|pm10-env|pm25-env|pm100-env|co2|gas-resistance|altitude|lux|eco2|unitless-percent|ambient-temp-fahrenheit|object-temp-fahrenheit|voc-index|nox-index|tvoc)$",
"required": [ "displayName", "sensorType" ],
"additionalProperties": false,
"properties": {
@ -24,7 +24,7 @@
"sensorType": {
"description": "One of the supported I2C sensor type strings (found in README).",
"type": "string",
"pattern": "^(unspecified|accelerometer|magnetic-field|orientation|gyroscope|light|pressure|proximity|gravity|acceleration|rotation|humidity|ambient-temp|object-temp|voltage|current|color|raw|pm10-std|pm25-std|pm100-std|pm10-env|pm25-env|pm100-env|co2|gas-resistance|altitude|lux|eco2|unitless-percent|ambient-temp-fahrenheit|object-temp-fahrenheit|voc-index|nox-index)$"
"pattern": "^(unspecified|accelerometer|magnetic-field|orientation|gyroscope|light|pressure|proximity|gravity|acceleration|rotation|humidity|ambient-temp|object-temp|voltage|current|color|raw|pm10-std|pm25-std|pm100-std|pm10-env|pm25-env|pm100-env|co2|gas-resistance|altitude|lux|eco2|unitless-percent|ambient-temp-fahrenheit|object-temp-fahrenheit|voc-index|nox-index|tvoc)$"
},
"defaultPeriod": {
"description": "What period to the form should default to for this sensor.",

View file

@ -130,5 +130,9 @@
"nox-index": {
"displayName": "Nitrogen Oxides Index",
"defaultPeriod": 900
},
"tvoc": {
"displayName": "Total Volatile Organic Compounds",
"defaultPeriod": 900
}
}