{
    "pluginAlias": "AppleTVEnhanced",
    "pluginType": "platform",
    "singular": true,
    "headerDisplay": "## Apple TV Enhanced\n\n Plugin that exposes the Apple TV to HomeKit with much richer features than the vanilla Apple TV integration of HomeKit. \n\n Made with ❤ by [maxileith](https://github.com/maxileith). \n\n [license of this plugin](https://raw.githubusercontent.com/maxileith/homebridge-appletv-enhanced/develop/LICENSE)",
    "schema": {
        "type": "object",
        "properties": {
            "name": {
                "title": "Platform Name",
                "type": "string",
                "default": "Apple TV Enhanced",
                "placeholder": "Apple TV Enhanced",
                "required": true,
                "description": "The name of the plugin, e.g. shown in the logs."
            },
            "mediaTypes": {
                "title": "Media Types as Motion Sensors",
                "description": "Media types for which a motion sensor is created that triggers when the according media type is present on the Apple TV.",
                "type": "array",
                "default": [],
                "items": {
                    "title": "Media Type",
                    "type": "string",
                    "enum": ["music", "tv", "unknown", "video"]
                },
                "required": true
            },
            "deviceStates": {
                "title": "Device States as Motion Sensors",
                "description": "Device states for which a motion sensor is created that triggers when the according device state is present on the Apple TV.<br/>The <strong>power state is always exposed</strong> with the Apple TV accessory itself. To create automations based on the power state refer to <a href=\"https://github.com/maxileith/homebridge-appletv-enhanced/issues/558#issuecomment-2317646770\">this GitHub issue</a>.",
                "type": "array",
                "default": [],
                "items": {
                    "title": "Device State",
                    "type": "string",
                    "enum": [
                        "idle",
                        "loading",
                        "paused",
                        "playing",
                        "seeking",
                        "stopped"
                    ]
                },
                "required": true
            },
            "deviceStateDelay": {
                "title": "Device State Delay (seconds)",
                "description": "The time in seconds that the Apple TV needs to report a device state continuously before the plugin will report the device state. E.g. when pausing a video, the video needs to stay paused for x seconds before the state will be reported.",
                "type": "integer",
                "default": 0,
                "placeholder": 0,
                "required": true,
                "minimum": 0,
                "maximum": 15
            },
            "remoteKeysAsSwitch": {
                "title": "Remote Keys as Switches",
                "description": "Remote keys which will be exposed as switches to HomeKit, e.g. to use the remote keys in automations.",
                "type": "array",
                "default": [],
                "items": {
                    "title": "Key",
                    "type": "string",
                    "enum": [
                        "channel_down",
                        "channel_up",
                        "down",
                        "home",
                        "home_hold",
                        "left",
                        "menu",
                        "next",
                        "pause",
                        "play",
                        "play_pause",
                        "previous",
                        "right",
                        "screensaver",
                        "select",
                        "skip_backward",
                        "skip_forward",
                        "stop",
                        "turn_off",
                        "turn_on",
                        "top_menu",
                        "up",
                        "volume_down",
                        "volume_up"
                    ]
                },
                "required": true
            },
            "avadaKedavraAppAmount": {
                "title": "Avada Kedavra App Amount",
                "description": "How many apps should be closed when selecting the Avada Kedavra Input? Avada Kedavra works by sending a sequence of remote control inputs to the Apple TV. The plugin therefore acts blindly and does not receive any feedback when all apps are closed. So if a high number is selected, the plugin presses the remote control until theoretically x apps are closed, although in reality all apps are already closed.",
                "type": "integer",
                "default": 15,
                "placeholder": 15,
                "required": true,
                "minimum": 5,
                "maximum": 35
            },
            "customInputURIs": {
                "title": "Custom Input URIs",
                "description": "Provide URIs for custom Inputs that open the URI on the Apple TV when selected.",
                "type": "array",
                "default": [],
                "required": true,
                "items": {
                    "type": "string",
                    "title": "URI",
                    "pattern": "^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$",
                    "placeholder": "https://www.disneyplus.com/movies/rogue-one-a-star-wars-story/14CV6eSbygOA"
                }
            },
            "disableVolumeControlRemote": {
                "title": "Disable volume control in iOS remote",
                "description": "Disables the volume control in the iOS remote. It is recommended to disable volume control when the audio setup that the Apple TV is connected to does not support HDMI-CEC since the Apple TV does not have any control over the volume in this scenario anyways.",
                "type": "boolean",
                "default": false,
                "required": true
            },
            "absoluteVolumeControl": {
                "title": "Absolute volume control (fan)",
                "description": "Exposes a fan that let's you control the volume in percentage. This does only work with your audio output does allow absolute volume control like on certain HDMI-CEC setups or if using HomePods.",
                "type": "boolean",
                "default": false,
                "required": true
            },
            "setTopBox": {
                "title": "Expose Set-Top Box Accessory",
                "description": "Instead of exposing an Apple TV accessory, the plugin will expose a set-top box accessory. You need to repair the accessory with your Home app in order to see the changes.",
                "type": "boolean",
                "default": false,
                "required": true
            },
            "discover": {
                "title": "Discover",
                "type": "object",
                "required": true,
                "properties": {
                    "multicast": {
                        "title": "Multicast",
                        "description": "The default and recommended way to discover Apple TVs.",
                        "type": "boolean",
                        "default": true,
                        "required": true
                    },
                    "unicast": {
                        "title": "Unicast",
                        "description": "Recommended for Apple TV devices that are not discovered by multicast discovery. Add the IPv4 addresses here. Remember that this requires the Apple TV to have a static IP.",
                        "type": "array",
                        "default": [],
                        "items": {
                            "title": "IPv4 Address",
                            "type": "string",
                            "format": "ipv4",
                            "placeholder": "192.168.0.42"
                        },
                        "required": true
                    },
                    "blacklist": {
                        "title": "Blacklist",
                        "description": "Apple TVs that should not be added as a device. You can get the MAC-Address from the logs. When using IPv4 Addresses the regarding Apple TVs need to have a static IP.",
                        "type": "array",
                        "default": [],
                        "items": {
                            "title": "MAC / IPv4 Address",
                            "type": "string",
                            "pattern": "^(((25[0-5]|(2[0-4]|1\\d|[1-9]|)\\d)(\\.(?!$)|$)){4}|([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2})$",
                            "placeholder": "AA:BB:CC:DD:EE:FF / 192.168.0.42"
                        },
                        "required": true
                    }
                }
            },
            "forceVenvRecreate": {
                "title": "Force Venv Recreation",
                "description": "Set this to force to recreate the virtual python environment with the next restart of the plugin. Remember to set this option to false after the virtual environment has been recreated.",
                "type": "boolean",
                "default": false,
                "required": true
            },
            "logLevel": {
                "title": "Log Level",
                "description": "Set the log level.",
                "type": "integer",
                "default": 3,
                "minimum": 0,
                "maximum": 5,
                "required": true,
                "oneOf": [
                    {
                        "title": "None",
                        "enum": [0]
                    },
                    {
                        "title": "Error",
                        "enum": [1]
                    },
                    {
                        "title": "Warn",
                        "enum": [2]
                    },
                    {
                        "title": "Info",
                        "enum": [3]
                    },
                    {
                        "title": "Debug",
                        "enum": [4]
                    },
                    {
                        "title": "Verbose",
                        "enum": [5]
                    }
                ]
            },
            "updateCheckLevel": {
                "title": "Update Check Level",
                "description": "Apple TV Enhanced is regularly checking if there is an update available and printing it to the logs. You can select whether you want to check for stable or beta updates.",
                "type": "string",
                "default": "stable",
                "oneOf": [
                    { "title": "beta", "enum": ["beta"] },
                    { "title": "stable", "enum": ["stable"] }
                ],
                "required": true
            },
            "autoUpdate": {
                "title": "Auto Update",
                "description": "Apple TV Enhanced will update itself automatically once there is an update available. Change the \"Update Check Level\" to install or leave out betas. It is recommended to operate this plugin as a child bridge if enabling this functionality since the plugin will automatically restart the bridge after updating (the whole homebridge if it the plugin is not running as its own child bridge). When selecting \"Auto\" (the default) auto updating is turned on if AppleTV Enhanced runs as a child bridge.",
                "type": "string",
                "oneOf": [
                    { "title": "Auto", "enum": ["auto"] },
                    { "title": "On", "enum": ["on"] },
                    { "title": "Off", "enum": ["off"] }
                ],
                "required": true
            },
            "updateCheckTime": {
                "title": "Update Check Time",
                "description": "Set the timeframe in which the plugin will search for updates. Make sure that your system time is correct.",
                "type": "integer",
                "oneOf": [
                    { "title": "0:00 - 0:59", "enum": [0] },
                    { "title": "1:00 - 1:59", "enum": [1] },
                    { "title": "2:00 - 2:59", "enum": [2] },
                    { "title": "3:00 - 3:59", "enum": [3] },
                    { "title": "4:00 - 4:59", "enum": [4] },
                    { "title": "5:00 - 5:59", "enum": [5] },
                    { "title": "6:00 - 6:59", "enum": [6] },
                    { "title": "7:00 - 7:59", "enum": [7] },
                    { "title": "8:00 - 8:59", "enum": [8] },
                    { "title": "9:00 - 9:59", "enum": [9] },
                    { "title": "10:00 - 10:59", "enum": [10] },
                    { "title": "11:00 - 11:59", "enum": [11] },
                    { "title": "12:00 - 12:59", "enum": [12] },
                    { "title": "13:00 - 13:59", "enum": [13] },
                    { "title": "14:00 - 14:59", "enum": [14] },
                    { "title": "15:00 - 15:59", "enum": [15] },
                    { "title": "16:00 - 16:59", "enum": [16] },
                    { "title": "17:00 - 17:59", "enum": [17] },
                    { "title": "18:00 - 18:59", "enum": [18] },
                    { "title": "19:00 - 19:59", "enum": [19] },
                    { "title": "20:00 - 20:59", "enum": [20] },
                    { "title": "21:00 - 21:59", "enum": [21] },
                    { "title": "22:00 - 22:59", "enum": [22] },
                    { "title": "23:00 - 23:59", "enum": [23] }
                ],
                "required": true,
                "minimum": 0,
                "maximum": 23,
                "default": 3
            },
            "pythonExecutable": {
                "title": "Python Executable",
                "description": "Here you can specify a path that points to a python executable. The plugin uses the systems default python as default. Setting a specific python executable here may be required if your systems default python version is too current for the plugin.",
                "type": "string",
                "placeholder": "/path/to/python3",
                "required": false
            },
            "customPyatvCommands": {
                "title": "Custom PyATV Commands",
                "description": "Define custom PyATV commands or sequences of commands and expose them as switches. Please refer to the PyATV documentation (https://pyatv.dev/documentation/atvremote/). Keep in mind that this is an advanced feature which can lead to errors when configured incorrectly.",
                "type": "array",
                "default": [],
                "required": true,
                "items": {
                    "type": "object",
                    "properties": {
                        "name": {
                            "title": "Name",
                            "description": "Name of the switch.",
                            "type": "string",
                            "placeholder": "App Drawer",
                            "required": true,
                            "pattern": "^\\S.*\\S$",
                            "maxLength": 64
                        },
                        "command": {
                            "title": "Command",
                            "description": "Specify the PyATV command that should be executed. A sequence of commands separated by spaces is possible as well.",
                            "type": "string",
                            "placeholder": "home delay=300 home",
                            "required": true,
                            "pattern": "^[a-z]+(_[a-z]+)*(=\\S+)?(\\s[a-z]+(_[a-z]+)*(=\\S+)?)*$"
                        }
                    }
                }
            },
            "deviceSpecificOverrides": {
                "title": "Device Specific Overrides",
                "type": "array",
                "default": [],
                "required": true,
                "items": {
                    "type": "object",
                    "properties": {
                        "mac": {
                            "title": "MAC Address",
                            "description": "MAC address of the Apple TV for which these overrides should apply. You can get the MAC address from the logs easily.",
                            "type": "string",
                            "placeholder": "AA:BB:CC:DD:EE:FF",
                            "required": true,
                            "pattern": "^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$"
                        },
                        "overrideMediaTypes": {
                            "title": "Override: Media Types as Motion Sensors",
                            "type": "boolean",
                            "default": false,
                            "required": true
                        },
                        "mediaTypes": {
                            "title": "Media Types as Motion Sensors",
                            "type": "array",
                            "items": {
                                "title": "Media Type",
                                "type": "string",
                                "enum": ["music", "tv", "unknown", "video"]
                            },
                            "default": [],
                            "required": true
                        },
                        "overrideDeviceStates": {
                            "title": "Override: Device States as Motion Sensors",
                            "type": "boolean",
                            "default": false,
                            "required": true
                        },
                        "deviceStates": {
                            "title": "Device States as Motion Sensors",
                            "type": "array",
                            "default": [],
                            "items": {
                                "title": "Device State",
                                "type": "string",
                                "enum": [
                                    "idle",
                                    "loading",
                                    "paused",
                                    "playing",
                                    "seeking",
                                    "stopped"
                                ]
                            },
                            "required": true
                        },
                        "overrideDeviceStateDelay": {
                            "title": "Override: Device State Delay (seconds)",
                            "type": "boolean",
                            "default": false,
                            "required": true
                        },
                        "deviceStateDelay": {
                            "title": "Device State Delay (seconds)",
                            "type": "integer",
                            "placeholder": 0,
                            "required": true,
                            "minimum": 0,
                            "maximum": 15,
                            "default": 0
                        },
                        "overrideRemoteKeysAsSwitch": {
                            "title": "Override: Remote Keys as Switches",
                            "type": "boolean",
                            "default": false,
                            "required": true
                        },
                        "remoteKeysAsSwitch": {
                            "title": "Remote Keys as Switches",
                            "type": "array",
                            "default": [],
                            "items": {
                                "title": "Key",
                                "type": "string",
                                "enum": [
                                    "channel_down",
                                    "channel_up",
                                    "down",
                                    "home",
                                    "home_hold",
                                    "left",
                                    "menu",
                                    "next",
                                    "pause",
                                    "play",
                                    "play_pause",
                                    "previous",
                                    "right",
                                    "screensaver",
                                    "select",
                                    "skip_backward",
                                    "skip_forward",
                                    "stop",
                                    "turn_off",
                                    "turn_on",
                                    "top_menu",
                                    "up",
                                    "volume_down",
                                    "volume_up"
                                ]
                            },
                            "required": true
                        },
                        "overrideCustomPyatvCommands": {
                            "title": "Override: Custom PyATV Commands",
                            "type": "boolean",
                            "default": false,
                            "required": true
                        },
                        "customPyatvCommands": {
                            "title": "Custom PyATV Commands",
                            "type": "array",
                            "default": [],
                            "required": true,
                            "items": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "title": "Name",
                                        "type": "string",
                                        "placeholder": "App Drawer",
                                        "required": true,
                                        "pattern": "^\\S.*\\S$",
                                        "maxLength": 64
                                    },
                                    "command": {
                                        "title": "Command",
                                        "type": "string",
                                        "placeholder": "home delay=300 home",
                                        "required": true,
                                        "pattern": "^[a-z]+(_[a-z]+)*(=\\S+)?(\\s[a-z]+(_[a-z]+)*(=\\S+)?)*$"
                                    }
                                }
                            }
                        },
                        "overrideAvadaKedavraAppAmount": {
                            "title": "Override: Avada Kedavra App Amount",
                            "type": "boolean",
                            "default": false,
                            "required": true
                        },
                        "avadaKedavraAppAmount": {
                            "title": "Avada Kedavra App Amount",
                            "type": "integer",
                            "placeholder": 15,
                            "required": true,
                            "minimum": 5,
                            "maximum": 35,
                            "default": 15
                        },
                        "overrideCustomInputURIs": {
                            "title": "Override: Custom Input URIs",
                            "type": "boolean",
                            "default": false,
                            "required": true
                        },
                        "customInputURIs": {
                            "title": "Custom Input URIs",
                            "type": "array",
                            "default": [],
                            "required": true,
                            "items": {
                                "type": "string",
                                "title": "URI",
                                "pattern": "^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$",
                                "placeholder": "https://www.disneyplus.com/movies/rogue-one-a-star-wars-story/14CV6eSbygOA"
                            }
                        },
                        "overrideDisableVolumeControlRemote": {
                            "title": "Override: Disable volume control in iOS remote",
                            "type": "boolean",
                            "default": false,
                            "required": true
                        },
                        "disableVolumeControlRemote": {
                            "title": "Disable volume control in iOS remote",
                            "type": "boolean",
                            "default": false,
                            "required": true
                        },
                        "overrideAbsoluteVolumeControl": {
                            "title": "Override: Absolute volume control (fan)",
                            "type": "boolean",
                            "default": false,
                            "required": true
                        },
                        "absoluteVolumeControl": {
                            "title": "Absolute volume control (fan)",
                            "type": "boolean",
                            "default": false,
                            "required": true
                        },
                        "overrideSetTopBox": {
                            "title": "Override: Expose Set-Top Box Accessory",
                            "type": "boolean",
                            "default": false,
                            "required": true
                        },
                        "setTopBox": {
                            "title": "Expose Set-Top Box Accessory",
                            "type": "boolean",
                            "default": false,
                            "required": true
                        }
                    }
                }
            }
        }
    },
    "form": [
        {
            "type": "fieldset",
            "expandable": true,
            "expanded": false,
            "title": "Basics",
            "description": "Settings that apply to all Apple TVs except if they are overwritten in the device specific overrides.",
            "items": [
                "mediaTypes",
                "deviceStates",
                "deviceStateDelay",
                "remoteKeysAsSwitch",
                {
                    "key": "customInputURIs",
                    "items": {
                        "key": "customInputURIs[]"
                    }
                },
                {
                    "key": "customPyatvCommands",
                    "items": [
                        "customPyatvCommands[].name",
                        "customPyatvCommands[].command"
                    ]
                },
                "avadaKedavraAppAmount",
                "disableVolumeControlRemote",
                "absoluteVolumeControl",
                "setTopBox"
            ]
        },
        {
            "type": "fieldset",
            "expandable": true,
            "expanded": false,
            "title": "Device Specific Overrides",
            "description": "Override the default settings for specific devices.",
            "items": [
                {
                    "type": "tabarray",
                    "key": "deviceSpecificOverrides",
                    "title": "{{ value.mac || 'Override' }}",
                    "items": [
                        "deviceSpecificOverrides[].mac",
                        {
                            "key": "deviceSpecificOverrides[].overrideMediaTypes",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac);"
                            }
                        },
                        {
                            "key": "deviceSpecificOverrides[].mediaTypes",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac) && model.deviceSpecificOverrides[arrayIndices].overrideMediaTypes === true;"
                            }
                        },
                        {
                            "key": "deviceSpecificOverrides[].overrideDeviceStates",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac);"
                            }
                        },
                        {
                            "key": "deviceSpecificOverrides[].deviceStates",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac) && model.deviceSpecificOverrides[arrayIndices].overrideDeviceStates === true;"
                            }
                        },
                        {
                            "key": "deviceSpecificOverrides[].overrideDeviceStateDelay",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac);"
                            }
                        },
                        {
                            "key": "deviceSpecificOverrides[].deviceStateDelay",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac) && model.deviceSpecificOverrides[arrayIndices].overrideDeviceStateDelay === true;"
                            }
                        },
                        {
                            "key": "deviceSpecificOverrides[].overrideRemoteKeysAsSwitch",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac);"
                            }
                        },
                        {
                            "key": "deviceSpecificOverrides[].remoteKeysAsSwitch",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac) && model.deviceSpecificOverrides[arrayIndices].overrideRemoteKeysAsSwitch === true;"
                            }
                        },
                        {
                            "key": "deviceSpecificOverrides[].overrideCustomPyatvCommands",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac);"
                            }
                        },
                        {
                            "key": "deviceSpecificOverrides[].customPyatvCommands",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac) && model.deviceSpecificOverrides[arrayIndices].overrideCustomPyatvCommands === true;"
                            },
                            "items": {
                                "key": "deviceSpecificOverrides[].customPyatvCommands[]",
                                "items": [
                                    "deviceSpecificOverrides[].customPyatvCommands[].name",
                                    "deviceSpecificOverrides[].customPyatvCommands[].command"
                                ]
                            }
                        },
                        {
                            "key": "deviceSpecificOverrides[].overrideAvadaKedavraAppAmount",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac);"
                            }
                        },
                        {
                            "key": "deviceSpecificOverrides[].avadaKedavraAppAmount",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac) && model.deviceSpecificOverrides[arrayIndices].overrideAvadaKedavraAppAmount === true;"
                            }
                        },
                        {
                            "key": "deviceSpecificOverrides[].overrideCustomInputURIs",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac);"
                            }
                        },
                        {
                            "key": "deviceSpecificOverrides[].customInputURIs",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac) && model.deviceSpecificOverrides[arrayIndices].overrideCustomInputURIs === true;"
                            },
                            "type": "array",
                            "items": {
                                "key": "deviceSpecificOverrides[].customInputURIs[]"
                            }
                        },
                        {
                            "key": "deviceSpecificOverrides[].overrideDisableVolumeControlRemote",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac);"
                            }
                        },
                        {
                            "key": "deviceSpecificOverrides[].disableVolumeControlRemote",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac) && model.deviceSpecificOverrides[arrayIndices].overrideDisableVolumeControlRemote === true;"
                            }
                        },
                        {
                            "key": "deviceSpecificOverrides[].overrideAbsoluteVolumeControl",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac);"
                            }
                        },
                        {
                            "key": "deviceSpecificOverrides[].absoluteVolumeControl",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac) && model.deviceSpecificOverrides[arrayIndices].overrideAbsoluteVolumeControl === true;"
                            }
                        },
                        {
                            "key": "deviceSpecificOverrides[].overrideSetTopBox",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac);"
                            }
                        },
                        {
                            "key": "deviceSpecificOverrides[].setTopBox",
                            "condition": {
                                "functionBody": "return (new RegExp('^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$')).test(model.deviceSpecificOverrides[arrayIndices].mac) && model.deviceSpecificOverrides[arrayIndices].overrideSetTopBox === true;"
                            }
                        }
                    ]
                }
            ]
        },
        {
            "type": "fieldset",
            "expandable": true,
            "expanded": false,
            "title": "Discovery",
            "description": "Settings regarding the discovery of Apple TVs.",
            "items": [
                "discover.multicast",
                {
                    "key": "discover.unicast",
                    "type": "array",
                    "items": [
                        {
                            "key": "discover.unicast[]"
                        }
                    ]
                },
                {
                    "key": "discover.blacklist",
                    "type": "array",
                    "items": {
                        "key": "discover.blacklist[]"
                    }
                }
            ]
        },
        {
            "type": "fieldset",
            "expandable": true,
            "expanded": false,
            "title": "Other",
            "description": "Settings you usually don't need to touch.",
            "items": [
                "name",
                "forceVenvRecreate",
                "logLevel",
                "updateCheckLevel",
                "updateCheckTime",
                "autoUpdate",
                "pythonExecutable"
            ]
        }
    ],
    "display": null
}
