Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Hub 2 Temperature and Humidity Support. #716

Merged
merged 9 commits into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@
"title": "Motion Sensor",
"enum": ["Motion Sensor"]
},

{
"title": "Hub 2",
"enum": ["Hub 2"]
},
{
"title": "Contact Sensor",
"enum": ["Contact Sensor"]
Expand Down Expand Up @@ -184,7 +189,7 @@
],
"description": "Bluetooth (BLE) API is only available for the following Device Types: Humidifier, Meter, MeterPlus, Curtain, Bot, Motion Sensor, Contact Sensor, Plug Mini (US), Plug Mini (JP), & Color Bulb",
"condition": {
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].hide_device);"
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType !== 'Hub 2');"
}
},
"customBLEaddress": {
Expand All @@ -203,6 +208,25 @@
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].hide_device && (model.options.devices[arrayIndices].connectionType === 'BLE' || model.options.devices[arrayIndices].connectionType === 'BLE/OpenAPI'));"
}
},
"hidHub": {
"type": "object",
"properties": {
"hide_temperature": {
"title": "Hide Hub 2's Temperature Sensor",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && (model.options.devices[arrayIndices].configDeviceType === 'Hub 2') && model.options.devices[arrayIndices].deviceId);"
}
},
"hide_humidity": {
"title": "Hide Hub 2's Humidity Sensor",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && (model.options.devices[arrayIndices].configDeviceType === 'Hub 2') && model.options.devices[arrayIndices].deviceId);"
}
}
}
},
"bot": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1134,6 +1158,8 @@
"options.devices[].hide_device",
"options.devices[].configDeviceType",
"options.devices[].connectionType",
"options.devices[].hidHub.hide_temperature",
"options.devices[].hidHub.hide_humidity",
"options.devices[].scanDuration",
"options.devices[].disableCaching",
"options.devices[].maxRetry",
Expand Down
Loading