diff --git a/README.md b/README.md index 5db4c0c..86d5a04 100644 --- a/README.md +++ b/README.md @@ -158,3 +158,4 @@ Possible values for an I2C component's subcomponents' `sensorType` field: - "lux" - "eco2" - "unitless-percent" +- "tvoc" diff --git a/components/i2c/schema.json b/components/i2c/schema.json index 7e52ed5..d573bdc 100644 --- a/components/i2c/schema.json +++ b/components/i2c/schema.json @@ -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.", diff --git a/components/sensors.json b/components/sensors.json index c90496f..ad3fb0b 100644 --- a/components/sensors.json +++ b/components/sensors.json @@ -130,5 +130,9 @@ "nox-index": { "displayName": "Nitrogen Oxides Index", "defaultPeriod": 900 + }, + "tvoc": { + "displayName": "Total Volatile Organic Compounds", + "defaultPeriod": 900 } }