{
  "pluginAlias": "Resideo",
  "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-resideo/latest/branding/Homebridge_x_Resideo.png'></p>\n\nThe **Homebridge Resideo** plugin allows you to control Resideo thermostats and also view your Leak and Room Sensors from HomeKit. \n\nTo get started link your Resideo account using the button below.",
  "footerDisplay": "Your Resideo account has been linked. Please raise any issues on our [project page](https://github.com/homebridge-plugins/homebridge-resideo/issues).\n\nIf you would like to have other Resideo Devices besides Thermostat, Leak Sensors, or Room Sensors added to this plugin fill out [Feature Request Form](https://github.com/homebridge-plugins/homebridge-resideo/issues/new?assignees=&labels=&template=feature_request.md).",
  "schema": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "title": "Name",
        "default": "Resideo"
      },
      "credentials": {
        "type": "object",
        "properties": {
          "consumerKey": {
            "title": "Consumer Key",
            "type": "string",
            "x-schema-form": {
              "type": "consumerKey"
            }
          },
          "consumerSecret": {
            "title": "Consumer Secret",
            "type": "string",
            "x-schema-form": {
              "type": "customerSecret"
            }
          },
          "refreshToken": {
            "title": "Refresh Token",
            "type": "string",
            "x-schema-form": {
              "type": "refreshToken"
            }
          },
          "notice": {
            "title": "Notice",
            "type": "string",
            "default": "Keep your tokens a secret!"
          }
        },
        "required": ["consumerKey", "consumerSecret", "refreshToken", "notice"]
      },
      "options": {
        "type": "object",
        "properties": {
          "preferMatter": {
            "title": "Prefer Matter",
            "type": "boolean",
            "default": true,
            "description": "When Matter is available in Homebridge v2.0+, prefer registering devices as Matter accessories. Requires enableMatter to also be true."
          },
          "enableMatter": {
            "title": "Enable Matter",
            "type": "boolean",
            "default": true,
            "description": "Allow the plugin to use the Homebridge Matter API (Homebridge v2.0+). Set to false to always use the HAP path."
          },
          "devices": {
            "type": "array",
            "items": {
              "title": "Devices",
              "type": "object",
              "properties": {
                "deviceID": {
                  "title": "Device ID",
                  "type": "string",
                  "placeholder": "81F3UT59513F"
                },
                "configDeviceName": {
                  "title": "Device Name",
                  "type": "string",
                  "pattern": "^[a-zA-Z0-9]+([a-zA-Z0-9 ]*[a-zA-Z0-9]+)?$",
                  "placeholder": "Hallway Thermostat",
                  "condition": {
                    "functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceID);"
                  }
                },
                "hide_device": {
                  "title": "Hide Device",
                  "type": "boolean",
                  "condition": {
                    "functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceID);"
                  }
                },
                "deviceClass": {
                  "title": "Device Class",
                  "type": "string",
                  "oneOf": [
                    {
                      "title": "Thermostat",
                      "enum": ["Thermostat"]
                    },
                    {
                      "title": "Leak Sensor",
                      "enum": ["LeakDetector"]
                    },
                    {
                      "title": "Shut Off Valve",
                      "enum": ["ShutoffValve"]
                    }
                  ],
                  "condition": {
                    "functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceID && !model.options.devices[arrayIndices].hide_device);"
                  }
                },
                "deviceModel": {
                  "title": "Thermostat Model",
                  "type": "string",
                  "placeholder": "T5",
                  "typeahead": {
                    "source": ["T9", "T10", "T5", "T6", "Round"]
                  },
                  "condition": {
                    "functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceID && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceClass === 'Thermostat');"
                  }
                },
                "thermostat": {
                  "type": "object",
                  "properties": {
                    "show_auto": {
                      "title": "Show Auto Mode",
                      "description": "Will show Auto mode, even if device API doesn't show it.",
                      "type": "boolean",
                      "condition": {
                        "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && model.options.devices[arrayIndices].deviceID);"
                      }
                    },
                    "hide_fan": {
                      "title": "Hide Thermostat Fan",
                      "type": "boolean",
                      "condition": {
                        "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && model.options.devices[arrayIndices].deviceID);"
                      }
                    },
                    "fan_mode_mapping": {
                      "title": "Fan Mode Mapping",
                      "type": "object",
                      "properties": {
                        "auto_mode": {
                          "title": "Auto Mode",
                          "type": "string",
                          "default": "Auto",
                          "oneOf": [
                            {
                              "title": "Auto",
                              "enum": ["Auto"]
                            },
                            {
                              "title": "On",
                              "enum": ["On"]
                            },
                            {
                              "title": "Circulate",
                              "enum": ["Circulate"]
                            }
                          ]
                        },
                        "on_mode": {
                          "title": "Manual/Active Mode",
                          "type": "string",
                          "default": "On",
                          "oneOf": [
                            {
                              "title": "Auto",
                              "enum": ["Auto"]
                            },
                            {
                              "title": "On",
                              "enum": ["On"]
                            },
                            {
                              "title": "Circulate",
                              "enum": ["Circulate"]
                            }
                          ]
                        },
                        "off_mode": {
                          "title": "Manual/Inactive Mode",
                          "type": "string",
                          "default": "Circulate",
                          "oneOf": [
                            {
                              "title": "Auto",
                              "enum": ["Auto"]
                            },
                            {
                              "title": "On",
                              "enum": ["On"]
                            },
                            {
                              "title": "Circulate",
                              "enum": ["Circulate"]
                            }
                          ]
                        }
                      },
                      "condition": {
                        "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && model.options.devices[arrayIndices].deviceID && !model.options.devices[arrayIndices].thermostat?.hide_fan);"
                      }
                    },
                    "hide_humidity": {
                      "title": "Hide Thermostat Humidity Service",
                      "type": "boolean",
                      "condition": {
                        "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && model.options.devices[arrayIndices].deviceID);"
                      }
                    },
                    "statefulStatus": {
                      "title": "Enable Stateful Programmable Switch (Only Works in 3rd Party Home Apps) for Automations on NoHold, TemporaryHold, PermanentHold",
                      "type": "boolean",
                      "condition": {
                        "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && model.options.devices[arrayIndices].deviceID);"
                      }
                    },
                    "thermostatSetpointStatus": {
                      "title": "Thermostat Setpoint Status (LCC Devices Only)",
                      "type": "string",
                      "description": "[PermanentHold] will hold the setpoint until user requests another change.\n[NoHold] will return to schedule.\n[TemporaryHold] will hold the set temperature until next schedule.",
                      "placeholder": "PermanentHold",
                      "oneOf": [
                        {
                          "title": "Permanent Hold",
                          "enum": ["PermanentHold"]
                        },
                        {
                          "title": "No Hold",
                          "enum": ["NoHold"]
                        },
                        {
                          "title": "Temporary Hold",
                          "enum": ["TemporaryHold"]
                        }
                      ],
                      "condition": {
                        "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && model.options.devices[arrayIndices].deviceID && (model.options.devices[arrayIndices].deviceModel === 'T9' || model.options.devices[arrayIndices].deviceModel === 'T10' || model.options.devices[arrayIndices].deviceModel === 'T5' || model.options.devices[arrayIndices].deviceModel === 'T6'));"
                      }
                    },
                    "roompriority": {
                      "title": "Room Priority Settings (T9-T10 Only)",
                      "type": "object",
                      "properties": {
                        "deviceType": {
                          "title": "Display As",
                          "type": "string",
                          "oneOf": [
                            {
                              "title": "Thermostat",
                              "enum": ["Thermostat"]
                            }
                          ],
                          "condition": {
                            "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceID && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && (model.options.devices[arrayIndices].deviceModel === 'T9' || model.options.devices[arrayIndices].deviceModel === 'T10'));"
                          }
                        },
                        "priorityType": {
                          "title": "Priority Type",
                          "type": "string",
                          "placeholder": "PickARoom",
                          "oneOf": [
                            {
                              "title": "Pick A Room",
                              "enum": ["PickARoom"]
                            },
                            {
                              "title": "Whole House",
                              "enum": ["WholeHouse"]
                            },
                            {
                              "title": "Follow Me",
                              "enum": ["FollowMe"]
                            }
                          ],
                          "condition": {
                            "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceID && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && (model.options.devices[arrayIndices].deviceModel === 'T9' || model.options.devices[arrayIndices].deviceModel === 'T10'));"
                          }
                        },
                        "refreshRate": {
                          "title": "Room Sensor Thermostat Refresh Rate",
                          "type": "number",
                          "minimum": 30,
                          "maximum": 2073600,
                          "placeholder": 360,
                          "description": "Indicates the number of seconds between polls of Resideo API.",
                          "condition": {
                            "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceID && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && (model.options.devices[arrayIndices].deviceModel === 'T9' || model.options.devices[arrayIndices].deviceModel === 'T10'));"
                          }
                        },
                        "pushRate": {
                          "title": "Room Sensor Thermostat Push Rate",
                          "type": "number",
                          "minimum": 30,
                          "maximum": 2073600,
                          "placeholder": 360,
                          "description": "Indicates the number of seconds between pushes to the Resideo API.",
                          "condition": {
                            "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceID && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && (model.options.devices[arrayIndices].deviceModel === 'T9' || model.options.devices[arrayIndices].deviceModel === 'T10'));"
                          }
                        },
                        "logging": {
                          "title": "Room Sensor Thermostat Logging Level Override",
                          "description": "Overrides the plugin logging level for this room sensor thermostat only. None turns off all messages from this plugin. Standard shows normal activity, warnings and errors. Debug adds detailed messages, and is what to use when reporting a problem. Default uses the device logging level.",
                          "type": "string",
                          "default": "default",
                          "oneOf": [
                            {
                              "title": "Default (uses the device logging level)",
                              "enum": ["default"]
                            },
                            {
                              "title": "None",
                              "enum": ["none"]
                            },
                            {
                              "title": "Standard",
                              "enum": ["standard"]
                            },
                            {
                              "title": "Debug",
                              "enum": ["debug"]
                            }
                          ],
                          "condition": {
                            "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceID && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && (model.options.devices[arrayIndices].deviceModel === 'T9' || model.options.devices[arrayIndices].deviceModel === 'T10'));"
                          }
                        }
                      },
                      "required": ["deviceType", "priorityType", "logging"],
                      "condition": {
                        "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceID && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && (model.options.devices[arrayIndices].deviceModel === 'T9' || model.options.devices[arrayIndices].deviceModel === 'T10'));"
                      }
                    },
                    "roomsensor": {
                      "title": "Room Sensor Settings (T9-T10 Only)",
                      "type": "object",
                      "properties": {
                        "hide_roomsensor": {
                          "title": "Hide Roomsensor(s)",
                          "type": "boolean",
                          "condition": {
                            "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && model.options.devices[arrayIndices].deviceID && (model.options.devices[arrayIndices].deviceModel === 'T9' || model.options.devices[arrayIndices].deviceModel === 'T10'));"
                          }
                        },
                        "hide_temperature": {
                          "title": "Hide Roomsensor Temperature Service",
                          "type": "boolean",
                          "condition": {
                            "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && model.options.devices[arrayIndices].deviceID && (model.options.devices[arrayIndices].deviceModel === 'T9' || model.options.devices[arrayIndices].deviceModel === 'T10') && !model.options.devices[arrayIndices].thermostat.roomsensor.hide_roomsensor);"
                          }
                        },
                        "hide_humidity": {
                          "title": "Hide Roomsensor Humidity Service",
                          "type": "boolean",
                          "condition": {
                            "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && model.options.devices[arrayIndices].deviceID && (model.options.devices[arrayIndices].deviceModel === 'T9' || model.options.devices[arrayIndices].deviceModel === 'T10') && !model.options.devices[arrayIndices].thermostat.roomsensor.hide_roomsensor);"
                          }
                        },
                        "hide_occupancy": {
                          "title": "Hide Roomsensor Occupancy Service",
                          "type": "boolean",
                          "condition": {
                            "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && model.options.devices[arrayIndices].deviceID && (model.options.devices[arrayIndices].deviceModel === 'T9' || model.options.devices[arrayIndices].deviceModel === 'T10') && !model.options.devices[arrayIndices].thermostat.roomsensor.hide_roomsensor);"
                          }
                        },
                        "refreshRate": {
                          "title": "Room Sensor Refresh Rate",
                          "type": "number",
                          "minimum": 30,
                          "maximum": 2073600,
                          "placeholder": 360,
                          "description": "Indicates the number of seconds between polls of Resideo API.",
                          "condition": {
                            "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && model.options.devices[arrayIndices].deviceID && (model.options.devices[arrayIndices].deviceModel === 'T9' || model.options.devices[arrayIndices].deviceModel === 'T10') && !model.options.devices[arrayIndices].thermostat.roomsensor.hide_roomsensor);"
                          }
                        },
                        "pushRate": {
                          "title": "Room Sensor Push Rate",
                          "type": "number",
                          "minimum": 30,
                          "maximum": 2073600,
                          "placeholder": 360,
                          "description": "Indicates the number of seconds between pushes to the Resideo API.",
                          "condition": {
                            "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && model.options.devices[arrayIndices].deviceID && (model.options.devices[arrayIndices].deviceModel === 'T9' || model.options.devices[arrayIndices].deviceModel === 'T10') && !model.options.devices[arrayIndices].thermostat.roomsensor.hide_roomsensor);"
                          }
                        },
                        "logging": {
                          "title": "Room Sensor Logging Level Override",
                          "description": "Overrides the plugin logging level for this room sensor only. None turns off all messages from this plugin. Standard shows normal activity, warnings and errors. Debug adds detailed messages, and is what to use when reporting a problem. Default uses the device logging level.",
                          "type": "string",
                          "default": "default",
                          "oneOf": [
                            {
                              "title": "Default (uses the device logging level)",
                              "enum": ["default"]
                            },
                            {
                              "title": "None",
                              "enum": ["none"]
                            },
                            {
                              "title": "Standard",
                              "enum": ["standard"]
                            },
                            {
                              "title": "Debug",
                              "enum": ["debug"]
                            }
                          ],
                          "condition": {
                            "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && model.options.devices[arrayIndices].deviceID && (model.options.devices[arrayIndices].deviceModel === 'T9' || model.options.devices[arrayIndices].deviceModel === 'T10') && !model.options.devices[arrayIndices].thermostat.roomsensor.hide_roomsensor);"
                          }
                        }
                      },
                      "condition": {
                        "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceClass === 'Thermostat' && model.options.devices[arrayIndices].deviceID && (model.options.devices[arrayIndices].deviceModel === 'T9' || model.options.devices[arrayIndices].deviceModel === 'T10') && !model.options.devices[arrayIndices].thermostat.roomsensor.hide_roomsensor);"
                      },
                      "required": ["logging"]
                    }
                  }
                },
                "valve": {
                  "title": "Shutoff Valve",
                  "type": "object",
                  "properties": {
                    "valveType": {
                      "title": "Valve Type",
                      "type": "integer",
                      "description": "Choose the icon HomeKit shows for this valve.",
                      "oneOf": [
                        { "title": "Generic Valve", "enum": [0] },
                        { "title": "Irrigation", "enum": [1] },
                        { "title": "Shower Head", "enum": [2] },
                        { "title": "Water Faucet", "enum": [3] }
                      ],
                      "condition": {
                        "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceClass === 'ShutoffValve' && model.options.devices[arrayIndices].deviceID);"
                      }
                    }
                  }
                },
                "leaksensor": {
                  "title": "Leak Sensor",
                  "type": "object",
                  "properties": {
                    "hide_leak": {
                      "title": "Hide Leak Service",
                      "type": "boolean",
                      "condition": {
                        "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceClass === 'LeakDetector' && model.options.devices[arrayIndices].deviceID);"
                      }
                    },
                    "hide_temperature": {
                      "title": "Hide Temperature Service",
                      "type": "boolean",
                      "condition": {
                        "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceClass === 'LeakDetector' && model.options.devices[arrayIndices].deviceID);"
                      }
                    },
                    "hide_humidity": {
                      "title": "Hide Humidity Service",
                      "type": "boolean",
                      "condition": {
                        "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceClass === 'LeakDetector' && model.options.devices[arrayIndices].deviceID);"
                      }
                    }
                  }
                },
                "retry": {
                  "title": "Retry",
                  "type": "boolean",
                  "description": "Retry after receiving a Resideo API Error.",
                  "condition": {
                    "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceID);"
                  }
                },
                "maxRetries": {
                  "title": "Max Retries",
                  "type": "integer",
                  "minimum": 1,
                  "placeholder": 1,
                  "description": "How many times to try again after a Resideo API error.",
                  "condition": {
                    "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].retry && model.options.devices[arrayIndices].deviceID);"
                  }
                },
                "delayBetweenRetries": {
                  "title": "Delay Between Retries",
                  "type": "integer",
                  "minimum": 1,
                  "placeholder": 5,
                  "description": "How long to wait, in seconds, before trying again after a Resideo API error.",
                  "condition": {
                    "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].retry && model.options.devices[arrayIndices].deviceID);"
                  }
                },
                "external": {
                  "title": "External Accessory",
                  "type": "boolean",
                  "condition": {
                    "functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceID && !model.options.devices[arrayIndices].hide_device);"
                  }
                },
                "firmware": {
                  "title": "Firmware Override",
                  "type": "string",
                  "placeholder": "1.2.8",
                  "condition": {
                    "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].deviceID);"
                  }
                },
                "refreshRate": {
                  "title": "Device Refresh Rate",
                  "type": "number",
                  "minimum": 30,
                  "maximum": 2073600,
                  "placeholder": 360,
                  "description": "Indicates the number of seconds between polls of Resideo API.",
                  "condition": {
                    "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && (model.options.devices[arrayIndices].deviceClass === 'Thermostat' || model.options.devices[arrayIndices].deviceClass === 'LeakDetector') && model.options.devices[arrayIndices].deviceID);"
                  }
                },
                "pushRate": {
                  "title": "Device Push Rate",
                  "type": "number",
                  "placeholder": 1,
                  "description": "Indicates the number of seconds between pushes to the of Resideo API.",
                  "condition": {
                    "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && (model.options.devices[arrayIndices].deviceClass === 'Thermostat' || model.options.devices[arrayIndices].deviceClass === 'LeakDetector') && model.options.devices[arrayIndices].deviceID);"
                  }
                },
                "logging": {
                  "title": "Device Logging Level Override",
                  "description": "Overrides the plugin logging level for this device only. None turns off all messages from this plugin. Standard shows normal activity, warnings and errors. Debug adds detailed messages, and is what to use when reporting a problem. Default uses the plugin logging level.",
                  "type": "string",
                  "default": "default",
                  "oneOf": [
                    {
                      "title": "Default (uses the plugin logging level)",
                      "enum": ["default"]
                    },
                    {
                      "title": "None",
                      "enum": ["none"]
                    },
                    {
                      "title": "Standard",
                      "enum": ["standard"]
                    },
                    {
                      "title": "Debug",
                      "enum": ["debug"]
                    }
                  ],
                  "condition": {
                    "functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && (model.options.devices[arrayIndices].deviceClass === 'Thermostat' || model.options.devices[arrayIndices].deviceClass === 'LeakDetector') && model.options.devices[arrayIndices].deviceID);"
                  }
                }
              },
              "required": ["deviceID", "deviceClass", "logging"]
            }
          },
          "refreshRate": {
            "title": "Refresh Rate",
            "type": "number",
            "minimum": 30,
            "maximum": 2073600,
            "placeholder": 120,
            "description": "Indicates the number of seconds between polls of the Resideo service."
          },
          "pushRate": {
            "title": "Push Rate",
            "type": "number",
            "placeholder": 1,
            "description": "Indicates the number of seconds between pushes to Honewell Home API."
          },
          "logging": {
            "title": "Plugin Logging Level",
            "description": "None turns off all messages from this plugin. Standard shows normal activity, warnings and errors. Debug adds detailed messages, and is what to use when reporting a problem. Default behaves the same as Standard, and also shows debug messages when Homebridge's own debug mode is on.",
            "type": "string",
            "default": "default",
            "oneOf": [
              {
                "title": "Default (follows the Homebridge debug setting)",
                "enum": ["default"]
              },
              {
                "title": "None",
                "enum": ["none"]
              },
              {
                "title": "Standard",
                "enum": ["standard"]
              },
              {
                "title": "Debug",
                "enum": ["debug"]
              }
            ]
          },
          "allowInvalidCharacters": {
            "title": "Allow Invalid Characters",
            "type": "boolean",
            "description": "If true, invalid characters will be allowed in the device name."
          },
          "convertUnits": {
            "title": "Temperature Unit Override",
            "type": "string",
            "default": "auto",
            "description": "Override automatic API unit handling when temperatures are reported with the wrong unit.",
            "oneOf": [
              {
                "title": "Automatic",
                "enum": ["auto"]
              },
              {
                "title": "Force Fahrenheit Input",
                "enum": ["fahrenheit"]
              },
              {
                "title": "Force Celsius Input",
                "enum": ["celsius"]
              }
            ]
          }
        },
        "required": ["logging", "convertUnits"]
      }
    },
    "required": ["name", "credentials"]
  },
  "layout": [
    {
      "type": "fieldset",
      "title": "Resideo Account Info",
      "expandable": true,
      "expanded": false,
      "items": [
        {
          "type": "help",
          "helpvalue": "<h5></h5><em class='primary-text'>This is for Manual Setup Only.</em>"
        },
        "credentials.consumerKey",
        "credentials.consumerSecret",
        "credentials.refreshToken"
      ]
    },
    {
      "type": "fieldset",
      "title": "Resideo Device Settings",
      "expandable": true,
      "expanded": false,
      "items": [
        {
          "key": "options.devices",
          "notitle": true,
          "type": "tabarray",
          "title": "{{ value.configDeviceName || value.deviceID || 'New Resideo Device' }}",
          "expandable": true,
          "expanded": false,
          "orderable": false,
          "items": [
            "options.devices[].configDeviceName",
            "options.devices[].deviceID",
            "options.devices[].hide_device",
            "options.devices[].deviceClass",
            "options.devices[].deviceModel",
            "options.devices[].thermostat.show_auto",
            "options.devices[].thermostat.hide_fan",
            {
              "key": "options.devices[].thermostat.fan_mode_mapping",
              "type": "fieldset",
              "expandable": true,
              "expanded": false,
              "items": [
                "options.devices[].thermostat.fan_mode_mapping.auto_mode",
                "options.devices[].thermostat.fan_mode_mapping.on_mode",
                "options.devices[].thermostat.fan_mode_mapping.off_mode"
              ]
            },
            "options.devices[].thermostat.hide_humidity",
            "options.devices[].thermostat.thermostatSetpointStatus",
            "options.devices[].valve.valveType",
            "options.devices[].leaksensor.hide_leak",
            "options.devices[].leaksensor.hide_temperature",
            "options.devices[].leaksensor.hide_humidity",
            {
              "key": "options.devices[].thermostat.roompriority",
              "type": "fieldset",
              "expandable": true,
              "expanded": false,
              "items": [
                "options.devices[].thermostat.roompriority.deviceType",
                "options.devices[].thermostat.roompriority.priorityType",
                {
                  "key": "options.devices[].thermostat.roompriority.refreshRate",
                  "description": "<em class='primary-text'>Specifies the interval, in seconds, for retrieving the latest device status from the Resido API. This interval applies only to this specific device's roompriority Thermostat(s).</em>"
                },
                {
                  "key": "options.devices[].thermostat.roompriority.pushRate",
                  "description": "<em class='primary-text'>Specifies the interval, in seconds, between pushes to the Resideo API for this specific device's roompriority Thermostat(s).</em>"
                },
                "options.devices[].thermostat.roompriority.logging"
              ]
            },
            {
              "key": "options.devices[].thermostat.roomsensor",
              "type": "fieldset",
              "expandable": true,
              "expanded": false,
              "items": [
                "options.devices[].thermostat.roomsensor.hide_roomsensor",
                "options.devices[].thermostat.roomsensor.hide_temperature",
                "options.devices[].thermostat.roomsensor.hide_humidity",
                "options.devices[].thermostat.roomsensor.hide_occupancy",
                {
                  "key": "options.devices[].thermostat.roomsensor.refreshRate",
                  "description": "<em class='primary-text'>Specifies the interval, in seconds, for retrieving the latest device status from the Resido API. This interval applies only to this specific device's roomsensor(s).</em>"
                },
                {
                  "key": "options.devices[].thermostat.roomsensor.pushRate",
                  "description": "<em class='primary-text'>Specifies the interval, in seconds, between pushes to the Resideo API for this specific device's roomsensor(s).</em>"
                },
                "options.devices[].thermostat.roomsensor.logging"
              ]
            },
            "options.devices[].retry",
            "options.devices[].maxRetries",
            "options.devices[].delayBetweenRetries",
            "options.devices[].firmware",
            "options.devices[].external",
            {
              "key": "options.devices[].refreshRate",
              "description": "<em class='primary-text'>Specifies the interval, in seconds, for retrieving the latest device status from the Resido API. This interval applies only to this specific device.</em>"
            },
            {
              "key": "options.devices[].pushRate",
              "description": "<em class='primary-text'>Specifies the interval, in seconds, between pushes to the Resideo API for this specific device.</em>"
            },
            "options.devices[].logging"
          ]
        }
      ]
    },
    {
      "type": "fieldset",
      "title": "Advanced Settings",
      "expandable": true,
      "expanded": false,
      "items": [
        {
          "key": "options.refreshRate",
          "description": "<em class='primary-text'>Specifies the interval, in seconds, for retrieving the latest device status from the Resido API.</em>"
        },
        {
          "key": "options.pushRate",
          "description": "<em class='primary-text'>Specifies the interval, in seconds, between pushes to the Resideo API.</em>"
        },
        "options.logging",
        "options.allowInvalidCharacters",
        "options.convertUnits"
      ]
    }
  ]
}
