@homebridge-plugins/homebridge-air
Version:
The AirNow plugin allows you to monitor the current AirQuality for your Zip Code from HomeKit and Siri.
283 lines (282 loc) • 9.74 kB
JSON
{
"pluginAlias": "Air",
"pluginType": "platform",
"singular": true,
"customUi": true,
"customUiPath": "./dist/homebridge-ui",
"headerDisplay": "<p align='center'><img width='250px' src='https://raw.githubusercontent.com/homebridge-plugins/homebridge-air/latest/branding/Homebridge_x_Air.svg'></p>\n\nThe **Homebridge Air** plugin allows you monitor the current AirQuality for your Zip Code from HomeKit and Siri.",
"footerDisplay": "Your AirNow apiKey was linked. Please raise any issues on our [project page](https://github.com/homebridge-plugins/homebridge-air/issues).\n\nIf you would like to have other features, fill out [Feature Request Form](https://github.com/homebridge-plugins/homebridge-air/issues/new?assignees=&labels=&template=feature_request.md).",
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name",
"default": "Air",
"required": true
},
"devices": {
"type": "array",
"items": {
"title": "Devices",
"type": "object",
"properties": {
"provider": {
"title": "Provider",
"type": "string",
"required": true,
"default": "airnow",
"oneOf": [
{
"title": "Air Now",
"description": "AirNow is a U.S. government agency that provides air quality data for the United States.",
"enum": [
"airnow"
]
},
{
"title": "Aqicn",
"description": "Aqicn is a global air quality data provider.",
"enum": [
"aqicn"
]
}
]
},
"apiKey": {
"title": "API Key",
"type": "string",
"required": true,
"x-schema-form": {
"type": "email"
}
},
"city": {
"title": "City",
"type": "string",
"required": false,
"description": "For AirNow: city name. For AQICN: city name, full AQICN URL, or full URL path like '/city/country/cityname', '/station/@stationid', or '/station/station-name/locale'. Explicit AQICN station/city paths are preferred over geo coordinates.",
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].apiKey);"
}
},
"latitude": {
"title": "Latitude",
"type": "string",
"required": false,
"condition": {
"functionBody": "return !(model.devices && model.devices[arrayIndices].city && model.devices[arrayIndices].state && model.devices[arrayIndices].zipCode);"
}
},
"longitude": {
"title": "Longitude",
"type": "string",
"required": false,
"condition": {
"functionBody": "return !(model.devices && model.devices[arrayIndices].city && model.devices[arrayIndices].state && model.devices[arrayIndices].zipCode);"
}
},
"state": {
"title": "State",
"type": "string",
"required": false,
"condition": {
"functionBody": "return !(model.devices && model.devices[arrayIndices].latitude && model.devices[arrayIndices].longitude);"
}
},
"zipCode": {
"title": "Zip Code",
"type": "string",
"required": false,
"condition": {
"functionBody": "return !(model.devices && model.devices[arrayIndices].latitude && model.devices[arrayIndices].longitude);"
}
},
"distance": {
"title": "Distance",
"type": "string",
"required": false,
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].city && model.devices[arrayIndices].zipCode);"
}
},
"firmware": {
"title": "Firmware Override",
"type": "string",
"placeholder": "1.2.8",
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].city && model.devices[arrayIndices].zipCode);"
}
},
"refreshRate": {
"title": "Device Refresh Rate",
"type": "number",
"minimum": 1800,
"placeholder": 1800,
"description": "Indicates the number of seconds between polls of the AirNow or Aqicn service.",
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].city && model.devices[arrayIndices].zipCode);"
}
},
"logging": {
"title": "Device Logging Override Setting",
"type": "string",
"required": true,
"default": "",
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].city && model.devices[arrayIndices].zipCode);"
},
"oneOf": [
{
"title": "Default Logging",
"enum": [
""
]
},
{
"title": "Standard Logging",
"enum": [
"standard"
]
},
{
"title": "No Logging",
"enum": [
"none"
]
},
{
"title": "Debug Logging",
"enum": [
"debug"
]
}
]
},
"hide_device": {
"title": "Delete Device",
"type": "boolean",
"description": "Delete this device from the plugin cache.",
"condition": {
"functionBody": "return (model.devices && model.devices[arrayIndices].city && model.devices[arrayIndices].zipCode);"
}
}
}
}
},
"refreshRate": {
"title": "Refresh Rate",
"type": "number",
"minimum": 1800,
"placeholder": 1800,
"description": "Indicates the number of seconds between polls of the AirNow or Aqicn service."
},
"options": {
"title": "Platform Options",
"type": "object",
"properties": {
"enableMatter": {
"title": "Enable Matter",
"type": "boolean",
"default": false,
"description": "Register Air Quality sensors as Matter accessories. Requires Matter to be enabled in Homebridge settings. Falls back to HAP if Matter is unavailable."
},
"preferMatter": {
"title": "Prefer Matter",
"type": "boolean",
"default": false,
"description": "Prefer Matter over HAP when Matter is available and enabled in Homebridge. If Matter is unavailable, HAP is used as a fallback."
}
}
},
"logging": {
"title": "Plugin Logging Setting",
"type": "string",
"required": true,
"default": "",
"oneOf": [
{
"title": "Default Logging",
"enum": [
""
]
},
{
"title": "Standard Logging",
"enum": [
"standard"
]
},
{
"title": "No Logging",
"enum": [
"none"
]
},
{
"title": "Debug Logging",
"enum": [
"debug"
]
}
]
}
}
},
"layout": [
{
"key": "devices",
"notitle": false,
"type": "tabarray",
"title": "{{ value.city || 'New City (Zip Code)' }}",
"expandable": true,
"expanded": false,
"orderable": false,
"items": [
"devices[].provider",
"devices[].apiKey",
"devices[].city",
"devices[].latitude",
"devices[].longitude",
"devices[].state",
"devices[].zipCode",
"devices[].distance",
"devices[].firmware",
"devices[].refreshRate",
"devices[].logging",
"devices[].hide_device"
]
},
{
"type": "fieldset",
"title": "Advanced Settings",
"expandable": true,
"expanded": false,
"items": [
{
"type": "help",
"helpvalue": "<h5>Refresh Rate</h5><em class='primary-text'>Refresh Rate indicates the number of seconds between polls of the AirNow or Aqicn service.</em>"
},
{
"key": "refreshRate",
"notitle": true
},
"logging"
]
},
{
"type": "fieldset",
"title": "Matter Settings",
"expandable": true,
"expanded": false,
"items": [
{
"type": "help",
"helpvalue": "<h5>Matter Support</h5><em class='primary-text'>Enable Matter support to register Air Quality sensors as Matter accessories. Requires Matter to be enabled in Homebridge settings (Homebridge v2.0+).</em>"
},
"options.enableMatter",
"options.preferMatter"
]
}
]
}