{
    "i18n": true,
    "type": "tabs",
    "iconPosition": "top",
    "items": {
        "_options": {
            "type": "panel",
            "label": "Options",
            "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuNC4yIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIzIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNNDk1LjkgMTY2LjZjMy4yIDguNyAuNSAxOC40LTYuNCAyNC42bC00My4zIDM5LjRjMS4xIDguMyAxLjcgMTYuOCAxLjcgMjUuNHMtLjYgMTcuMS0xLjcgMjUuNGw0My4zIDM5LjRjNi45IDYuMiA5LjYgMTUuOSA2LjQgMjQuNmMtNC40IDExLjktOS43IDIzLjMtMTUuOCAzNC4zbC00LjcgOC4xYy02LjYgMTEtMTQgMjEuNC0yMi4xIDMxLjJjLTUuOSA3LjItMTUuNyA5LjYtMjQuNSA2LjhsLTU1LjctMTcuN2MtMTMuNCAxMC4zLTI4LjIgMTguOS00NCAyNS40bC0xMi41IDU3LjFjLTIgOS4xLTkgMTYuMy0xOC4yIDE3LjhjLTEzLjggMi4zLTI4IDMuNS00Mi41IDMuNXMtMjguNy0xLjItNDIuNS0zLjVjLTkuMi0xLjUtMTYuMi04LjctMTguMi0xNy44bC0xMi41LTU3LjFjLTE1LjgtNi41LTMwLjYtMTUuMS00NC0yNS40TDgzLjEgNDI1LjljLTguOCAyLjgtMTguNiAuMy0yNC41LTYuOGMtOC4xLTkuOC0xNS41LTIwLjItMjIuMS0zMS4ybC00LjctOC4xYy02LjEtMTEtMTEuNC0yMi40LTE1LjgtMzQuM2MtMy4yLTguNy0uNS0xOC40IDYuNC0yNC42bDQzLjMtMzkuNEM2NC42IDI3My4xIDY0IDI2NC42IDY0IDI1NnMuNi0xNy4xIDEuNy0yNS40TDIyLjQgMTkxLjJjLTYuOS02LjItOS42LTE1LjktNi40LTI0LjZjNC40LTExLjkgOS43LTIzLjMgMTUuOC0zNC4zbDQuNy04LjFjNi42LTExIDE0LTIxLjQgMjIuMS0zMS4yYzUuOS03LjIgMTUuNy05LjYgMjQuNS02LjhsNTUuNyAxNy43YzEzLjQtMTAuMyAyOC4yLTE4LjkgNDQtMjUuNGwxMi41LTU3LjFjMi05LjEgOS0xNi4zIDE4LjItMTcuOEMyMjcuMyAxLjIgMjQxLjUgMCAyNTYgMHMyOC43IDEuMiA0Mi41IDMuNWM5LjIgMS41IDE2LjIgOC43IDE4LjIgMTcuOGwxMi41IDU3LjFjMTUuOCA2LjUgMzAuNiAxNS4xIDQ0IDI1LjRsNTUuNy0xNy43YzguOC0yLjggMTguNi0uMyAyNC41IDYuOGM4LjEgOS44IDE1LjUgMjAuMiAyMi4xIDMxLjJsNC43IDguMWM2LjEgMTEgMTEuNCAyMi40IDE1LjggMzQuM3pNMjU2IDMzNmE4MCA4MCAwIDEgMCAwLTE2MCA4MCA4MCAwIDEgMCAwIDE2MHoiLz48L3N2Zz4=",
            "items": {
                "_headerOptionsConnection": {
                    "newLine": true,
                    "type": "header",
                    "text": "Connection",
                    "size": 2,
                    "xs": 12,
                    "sm": 12,
                    "md": 12,
                    "lg": 12,
                    "xl": 6
                },
                "awtrixIp": {
                    "type": "text",
                    "label": "IP",
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 6,
                    "xl": 6,
                    "help": "IP address of your Awtrix Light device",
                    "validator": "String(data.awtrixIp).length > 0 && !String(data.awtrixIp).startsWith('http')",
                    "validatorErrorText": "Invalid IP address",
                    "validatorNoSaveOnError": true
                },
                "userName": {
                    "newLine": true,
                    "type": "text",
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 6,
                    "xl": 6,
                    "label": "Username"
                },
                "userPassword": {
                    "type": "password",
                    "repeat": false,
                    "visible": false,
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 6,
                    "xl": 6,
                    "label": "Password"
                },
                "_headerOptionsScreen": {
                    "newLine": true,
                    "type": "header",
                    "text": "Screen",
                    "size": 2,
                    "xs": 12,
                    "sm": 12,
                    "md": 12,
                    "lg": 12,
                    "xl": 12
                },
                "downloadScreenContent": {
                    "type": "checkbox",
                    "label": "Download screen content",
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 6,
                    "xl": 6
                },
                "downloadScreenContentInterval": {
                    "hidden": "!data.downloadScreenContent",
                    "type": "number",
                    "label": "Download interval (in seconds)",
                    "min": 1,
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 6,
                    "xl": 6
                },
                "_headerOptionsSupport": {
                    "newLine": true,
                    "type": "header",
                    "text": "Support this project",
                    "size": 3,
                    "xs": 12,
                    "sm": 12,
                    "md": 12,
                    "lg": 12,
                    "xl": 12
                },
                "_buyDeviceLink": {
                    "newLine": true,
                    "type": "staticLink",
                    "href": "https://haus-auto.com/p/ali/UlanziTC001",
                    "label": {
                        "en": "Buy on AliExpress",
                        "de": "Kaufen bei AliExpress",
                        "ru": "Купить на AliExpress",
                        "pt": "Comprar na AliExpress",
                        "nl": "Koop AliExpress",
                        "fr": "Acheter sur AliExpress",
                        "it": "Comprare su AliExpress",
                        "es": "Comprar en AliExpress",
                        "pl": "Buy on AliExpress",
                        "uk": "Купити на AliExpress",
                        "zh-cn": "购买于 AliExpress"
                    },
                    "button": true,
                    "variant": "contained",
                    "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1NzYgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuNC4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIzIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMCAyNEMwIDEwLjcgMTAuNyAwIDI0IDBINjkuNWMyMiAwIDQxLjUgMTIuOCA1MC42IDMyaDQxMWMyNi4zIDAgNDUuNSAyNSAzOC42IDUwLjRsLTQxIDE1Mi4zYy04LjUgMzEuNC0zNyA1My4zLTY5LjUgNTMuM0gxNzAuN2w1LjQgMjguNWMyLjIgMTEuMyAxMi4xIDE5LjUgMjMuNiAxOS41SDQ4OGMxMy4zIDAgMjQgMTAuNyAyNCAyNHMtMTAuNyAyNC0yNCAyNEgxOTkuN2MtMzQuNiAwLTY0LjMtMjQuNi03MC43LTU4LjVMNzcuNCA1NC41Yy0uNy0zLjgtNC02LjUtNy45LTYuNUgyNEMxMC43IDQ4IDAgMzcuMyAwIDI0ek0xMjggNDY0YTQ4IDQ4IDAgMSAxIDk2IDAgNDggNDggMCAxIDEgLTk2IDB6bTMzNi00OGE0OCA0OCAwIDEgMSAwIDk2IDQ4IDQ4IDAgMSAxIDAtOTZ6Ii8+PC9zdmc+",
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 6,
                    "xl": 6
                },
                "_buyDeviceLink2": {
                    "type": "staticLink",
                    "href": "https://haus-auto.com/p/ula/UlanziTC001",
                    "label": {
                        "en": "Buy on ulanzi.de",
                        "de": "Kaufen bei ulanzi.de",
                        "ru": "Купить на ulanzi.de",
                        "pt": "Comprar na ulanzi.de",
                        "nl": "Koop ulanzi.de",
                        "fr": "Acheter sur ulanzi.de",
                        "it": "Comprare su ulanzi.de",
                        "es": "Comprar en ulanzi.de",
                        "pl": "Buy on ulanzi.de",
                        "uk": "Купити на ulanzi.de",
                        "zh-cn": "购买于 ulanzi.de"
                    },
                    "button": true,
                    "variant": "contained",
                    "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1NzYgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuNC4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIzIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMCAyNEMwIDEwLjcgMTAuNyAwIDI0IDBINjkuNWMyMiAwIDQxLjUgMTIuOCA1MC42IDMyaDQxMWMyNi4zIDAgNDUuNSAyNSAzOC42IDUwLjRsLTQxIDE1Mi4zYy04LjUgMzEuNC0zNyA1My4zLTY5LjUgNTMuM0gxNzAuN2w1LjQgMjguNWMyLjIgMTEuMyAxMi4xIDE5LjUgMjMuNiAxOS41SDQ4OGMxMy4zIDAgMjQgMTAuNyAyNCAyNHMtMTAuNyAyNC0yNCAyNEgxOTkuN2MtMzQuNiAwLTY0LjMtMjQuNi03MC43LTU4LjVMNzcuNCA1NC41Yy0uNy0zLjgtNC02LjUtNy45LTYuNUgyNEMxMC43IDQ4IDAgMzcuMyAwIDI0ek0xMjggNDY0YTQ4IDQ4IDAgMSAxIDk2IDAgNDggNDggMCAxIDEgLTk2IDB6bTMzNi00OGE0OCA0OCAwIDEgMSAwIDk2IDQ4IDQ4IDAgMSAxIDAtOTZ6Ii8+PC9zdmc+",
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 6,
                    "xl": 6
                },
                "_ioBrokerKursBanner": {
                    "newLine": true,
                    "type": "staticImage",
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 6,
                    "xl": 6,
                    "href": "https://haus-automatisierung.com/iobroker-kurs/?refid=iobroker-awtrix-light",
                    "src": "https://haus-automatisierung.com/images/ads/ioBroker-Kurs.png"
                }
            }
        },
        "_customApps": {
            "type": "panel",
            "label": "Apps",
            "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1NzYgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuNC4yIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIzIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNNjQgMEMyOC43IDAgMCAyOC43IDAgNjRWMzUyYzAgMzUuMyAyOC43IDY0IDY0IDY0SDI0MGwtMTAuNyAzMkgxNjBjLTE3LjcgMC0zMiAxNC4zLTMyIDMyczE0LjMgMzIgMzIgMzJINDE2YzE3LjcgMCAzMi0xNC4zIDMyLTMycy0xNC4zLTMyLTMyLTMySDM0Ni43TDMzNiA0MTZINTEyYzM1LjMgMCA2NC0yOC43IDY0LTY0VjY0YzAtMzUuMy0yOC43LTY0LTY0LTY0SDY0ek01MTIgNjRWMzUySDY0VjY0SDUxMnoiLz48L3N2Zz4=",
            "items": {
                "_useOtherInstance": {
                    "newLine": true,
                    "type": "header",
                    "text": "Use settings of other instance",
                    "size": 2,
                    "xs": 12,
                    "sm": 12,
                    "md": 12,
                    "lg": 12,
                    "xl": 12
                },
                "foreignSettingsInstance": {
                    "newLine": true,
                    "type": "instance",
                    "label": "Copy app settings of",
                    "adapter": "awtrix-light",
                    "allowDeactivate": true,
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 6,
                    "xl": 6,
                    "validator": "data.foreignSettingsInstance === '' || data.foreignSettingsInstance !== `awtrix-light.${_instance}`",
                    "validatorErrorText": "Select another instance",
                    "validatorNoSaveOnError": true
                },
                "foreignSettingsInstanceActivateApps": {
                    "hidden": "data.foreignSettingsInstance === '' || data.foreignSettingsInstance === `awtrix-light.${_instance}`",
                    "type": "checkbox",
                    "label": "Activate same apps as in main instance",
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 6,
                    "xl": 6
                },
                "_headerCustomApps": {
                    "hidden": "!!data.foreignSettingsInstance",
                    "newLine": true,
                    "type": "header",
                    "text": "Custom Apps",
                    "size": 2,
                    "xs": 12,
                    "sm": 12,
                    "md": 12,
                    "lg": 12,
                    "xl": 12
                },
                "customApps": {
                    "hidden": "!!data.foreignSettingsInstance",
                    "newLine": true,
                    "type": "accordion",
                    "titleAttr": "name",
                    "xs": 12,
                    "sm": 12,
                    "md": 12,
                    "lg": 12,
                    "xl": 12,
                    "items": [
                        {
                            "type": "text",
                            "attr": "name",
                            "label": "Name",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4,
                            "default": "custom",
                            "help": "Just lower case letters (a-z)",
                            "validator": "/^([a-z]{1,})$/.test(data.name) && !['time', 'date', 'temperature', 'humidity', 'battery'].includes(data.name) && [...globalData.customApps, ...globalData.historyApps, ...globalData.expertApps].filter(app => app.name === data.name).length === 1",
                            "validatorErrorText": "Just lower case letters (a-z)",
                            "validatorNoSaveOnError": true
                        },
                        {
                            "type": "text",
                            "attr": "icon",
                            "label": "Icon",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4,
                            "default": "",
                            "help": "Must be uploaded manually",
                            "helpLink": "https://blueforcer.github.io/awtrix3/#/icons"
                        },
                        {
                            "type": "number",
                            "attr": "duration",
                            "label": "Duration (sec)",
                            "xs": 12,
                            "sm": 12,
                            "md": 2,
                            "lg": 2,
                            "xl": 2,
                            "default": 0,
                            "min": 0,
                            "help": "0 = default"
                        },
                        {
                            "type": "number",
                            "attr": "repeat",
                            "label": "Repetitions",
                            "xs": 12,
                            "sm": 12,
                            "md": 2,
                            "lg": 2,
                            "xl": 2,
                            "default": 0,
                            "min": 0
                        },
                        {
                            "type": "text",
                            "attr": "text",
                            "label": "Text",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4,
                            "default": "%s %u",
                            "help": "%s will be replaced by value and %u by unit",
                            "validator": "data.objId.length == 0 || data.text.includes('%s')",
                            "validatorErrorText": "Remove object or add %s (and %u) to text",
                            "validatorNoSaveOnError": true
                        },
                        {
                            "type": "objectId",
                            "attr": "objId",
                            "label": "Object",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4,
                            "default": "",
                            "help": "Should be type of string or number",
                            "validator": "!data.text.includes('%s') || data.objId.length > 0",
                            "validatorErrorText": "Select object or remove %s and %u from text",
                            "validatorNoSaveOnError": true
                        },
                        {
                            "type": "number",
                            "attr": "decimals",
                            "label": "Decimals",
                            "xs": 12,
                            "sm": 12,
                            "md": 2,
                            "lg": 2,
                            "xl": 2,
                            "default": 3,
                            "help": "Numeric values will be rounded"
                        },
                        {
                            "type": "checkbox",
                            "attr": "dynamicRound",
                            "label": "Round dynamically",
                            "xs": 12,
                            "sm": 12,
                            "md": 2,
                            "lg": 2,
                            "xl": 2,
                            "default": false,
                            "help": "Adjust digits to avoid scrolling"
                        },
                        {
                            "newLine": true,
                            "type": "header",
                            "attr": "_textHeader",
                            "text": "Text options",
                            "size": 3,
                            "xs": 12,
                            "sm": 12,
                            "md": 12,
                            "lg": 12,
                            "xl": 12
                        },
                        {
                            "newLine": true,
                            "type": "checkbox",
                            "attr": "rainbow",
                            "label": "Text in rainbow colors",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4
                        },
                        {
                            "hidden": "!!data.rainbow",
                            "type": "color",
                            "attr": "textColor",
                            "label": "Text color",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4,
                            "default": "#FFFFFF"
                        },
                        {
                            "newLine": true,
                            "type": "checkbox",
                            "attr": "noScroll",
                            "label": "Disable text scrolling",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4
                        },
                        {
                            "hidden": "!!data.noScroll",
                            "type": "number",
                            "attr": "scrollSpeed",
                            "label": "Scroll speed",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4,
                            "default": 0,
                            "min": 0,
                            "max": 100,
                            "help": "0 = default"
                        },
                        {
                            "newLine": true,
                            "type": "header",
                            "attr": "_backgroundHeader",
                            "text": "Background options",
                            "size": 3,
                            "xs": 12,
                            "sm": 12,
                            "md": 12,
                            "lg": 12,
                            "xl": 12
                        },
                        {
                            "newLine": true,
                            "type": "checkbox",
                            "attr": "useBackgroundEffect",
                            "label": "Use background effect",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4,
                            "default": false
                        },
                        {
                            "hidden": "!!data.useBackgroundEffect",
                            "type": "color",
                            "attr": "backgroundColor",
                            "label": "Background color",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4,
                            "default": "#000000"
                        },
                        {
                            "hidden": "!data.useBackgroundEffect",
                            "type": "selectSendTo",
                            "attr": "backgroundEffect",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4,
                            "command": "getBackgroundEffects",
                            "data": {},
                            "noTranslation": true,
                            "default": "BrickBreaker",
                            "label": "Background effect",
                            "help": "See all effects",
                            "helpLink": "https://blueforcer.github.io/awtrix3/#/effects"
                        },
                        {
                            "hidden": "data.objId.length == 0",
                            "newLine": true,
                            "type": "header",
                            "attr": "_thresholdHeader",
                            "text": "Threshold overrides (type of state must be number)",
                            "size": 3,
                            "xs": 12,
                            "sm": 12,
                            "md": 12,
                            "lg": 12,
                            "xl": 12
                        },
                        {
                            "hidden": "data.objId.length == 0",
                            "newLine": true,
                            "type": "checkbox",
                            "attr": "thresholdLtActive",
                            "label": "If value less than",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4
                        },
                        {
                            "hidden": "!data.thresholdLtActive",
                            "type": "number",
                            "attr": "thresholdLtValue",
                            "label": "If value less than",
                            "xs": 12,
                            "sm": 12,
                            "md": 2,
                            "lg": 2,
                            "xl": 2,
                            "default": 0,
                            "step": 0.1,
                            "validator": "!isNaN(data.thresholdLtValue)",
                            "validatorErrorText": "Set valid number",
                            "validatorNoSaveOnError": true
                        },
                        {
                            "hidden": "!data.thresholdLtActive",
                            "type": "text",
                            "attr": "thresholdLtIcon",
                            "label": "Icon",
                            "xs": 12,
                            "sm": 12,
                            "md": 2,
                            "lg": 2,
                            "xl": 2,
                            "default": "",
                            "validator": "data.thresholdLtIcon || data.thresholdLtTextColor || data.thresholdLtBackgroundColor",
                            "validatorErrorText": "Set icon, text color or background color override",
                            "validatorNoSaveOnError": true
                        },
                        {
                            "hidden": "!data.thresholdLtActive",
                            "type": "color",
                            "attr": "thresholdLtTextColor",
                            "label": "Text color",
                            "xs": 12,
                            "sm": 12,
                            "md": 2,
                            "lg": 2,
                            "xl": 2,
                            "default": "",
                            "validator": "data.thresholdLtIcon || data.thresholdLtTextColor || data.thresholdLtBackgroundColor",
                            "validatorErrorText": "Set icon, text color or background color override",
                            "validatorNoSaveOnError": true
                        },
                        {
                            "hidden": "!data.thresholdLtActive",
                            "type": "color",
                            "attr": "thresholdLtBackgroundColor",
                            "label": "Background color",
                            "xs": 12,
                            "sm": 12,
                            "md": 2,
                            "lg": 2,
                            "xl": 2,
                            "default": "",
                            "validator": "data.thresholdLtIcon || data.thresholdLtTextColor || data.thresholdLtBackgroundColor",
                            "validatorErrorText": "Set icon, text color or background color override",
                            "validatorNoSaveOnError": true
                        },
                        {
                            "hidden": "data.objId.length == 0",
                            "newLine": true,
                            "type": "checkbox",
                            "attr": "thresholdGtActive",
                            "label": "If value greater than",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4
                        },
                        {
                            "hidden": "!data.thresholdGtActive",
                            "type": "number",
                            "attr": "thresholdGtValue",
                            "label": "If value greater than",
                            "xs": 12,
                            "sm": 12,
                            "md": 2,
                            "lg": 2,
                            "xl": 2,
                            "default": 100,
                            "step": 0.1,
                            "validator": "!isNaN(data.thresholdGtValue)",
                            "validatorErrorText": "Set valid number",
                            "validatorNoSaveOnError": true
                        },
                        {
                            "hidden": "!data.thresholdGtActive",
                            "type": "text",
                            "attr": "thresholdGtIcon",
                            "label": "Icon",
                            "xs": 12,
                            "sm": 12,
                            "md": 2,
                            "lg": 2,
                            "xl": 2,
                            "default": "",
                            "validator": "data.thresholdGtIcon || data.thresholdGtTextColor || data.thresholdGtBackgroundColor",
                            "validatorErrorText": "Set icon, text color or background color override",
                            "validatorNoSaveOnError": true
                        },
                        {
                            "hidden": "!data.thresholdGtActive",
                            "type": "color",
                            "attr": "thresholdGtTextColor",
                            "label": "Text color",
                            "xs": 12,
                            "sm": 12,
                            "md": 2,
                            "lg": 2,
                            "xl": 2,
                            "default": "",
                            "validator": "data.thresholdGtIcon || data.thresholdGtTextColor || data.thresholdGtBackgroundColor",
                            "validatorErrorText": "Set icon, text color or background color override",
                            "validatorNoSaveOnError": true
                        },
                        {
                            "hidden": "!data.thresholdGtActive",
                            "type": "color",
                            "attr": "thresholdGtBackgroundColor",
                            "label": "Background color",
                            "xs": 12,
                            "sm": 12,
                            "md": 2,
                            "lg": 2,
                            "xl": 2,
                            "default": "",
                            "validator": "data.thresholdGtIcon || data.thresholdGtTextColor || data.thresholdGtBackgroundColor",
                            "validatorErrorText": "Set icon, text color or background color override",
                            "validatorNoSaveOnError": true
                        },
                        {
                            "hidden": "!globalData.customPositions",
                            "newLine": true,
                            "type": "header",
                            "attr": "_expertOptionsHeader",
                            "text": "Expert options",
                            "size": 3,
                            "xs": 12,
                            "sm": 12,
                            "md": 12,
                            "lg": 12,
                            "xl": 12
                        },
                        {
                            "hidden": "!globalData.customPositions",
                            "type": "number",
                            "attr": "position",
                            "label": "Position",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4,
                            "default": 0,
                            "min": 0,
                            "step": 1
                        }
                    ]
                },
                "ignoreNewValueForAppInTimeRange": {
                    "hidden": "!!data.foreignSettingsInstance",
                    "newLine": true,
                    "type": "number",
                    "min": 0,
                    "xs": 12,
                    "sm": 12,
                    "md": 4,
                    "lg": 4,
                    "xl": 4,
                    "label": "Ignore new values after state change (in seconds)",
                    "help": "Prevents too many requests for rapid state changes"
                },
                "_headerHistoryApps": {
                    "hidden": "!!data.foreignSettingsInstance",
                    "newLine": true,
                    "type": "header",
                    "text": "History Apps",
                    "size": 2,
                    "xs": 12,
                    "sm": 12,
                    "md": 12,
                    "lg": 12,
                    "xl": 12
                },
                "historyApps": {
                    "hidden": "!!data.foreignSettingsInstance",
                    "newLine": true,
                    "type": "accordion",
                    "titleAttr": "name",
                    "xs": 12,
                    "sm": 12,
                    "md": 12,
                    "lg": 12,
                    "xl": 12,
                    "items": [
                        {
                            "type": "text",
                            "attr": "name",
                            "label": "Name",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4,
                            "default": "history",
                            "help": "Just lower case letters (a-z)",
                            "validator": "/^([a-z]{1,})$/.test(data.name) && !['time', 'date', 'temperature', 'humidity', 'battery'].includes(data.name) && [...globalData.customApps, ...globalData.historyApps, ...globalData.expertApps].filter(app => app.name === data.name).length === 1",
                            "validatorErrorText": "Just lower case letters (a-z)",
                            "validatorNoSaveOnError": true
                        },
                        {
                            "type": "text",
                            "attr": "icon",
                            "label": "Icon",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4,
                            "default": "",
                            "help": "Must be uploaded manually",
                            "helpLink": "https://blueforcer.github.io/awtrix3/#/icons"
                        },
                        {
                            "type": "number",
                            "attr": "duration",
                            "label": "Duration (sec)",
                            "xs": 12,
                            "sm": 12,
                            "md": 2,
                            "lg": 2,
                            "xl": 2,
                            "default": 0,
                            "min": 0,
                            "help": "0 = default"
                        },
                        {
                            "type": "number",
                            "attr": "repeat",
                            "label": "Repetitions",
                            "xs": 12,
                            "sm": 12,
                            "md": 2,
                            "lg": 2,
                            "xl": 2,
                            "default": 0,
                            "min": 0
                        },
                        {
                            "newLine": true,
                            "type": "instance",
                            "attr": "sourceInstance",
                            "label": "Source instance",
                            "adapter": "_dataSources",
                            "allowDeactivate": false,
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4
                        },
                        {
                            "type": "objectId",
                            "attr": "objId",
                            "label": "Object",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4,
                            "default": "",
                            "help": "Logging must be enabled for the selected ID",
                            "validator": "data.objId.length > 0",
                            "validatorErrorText": "Select data source",
                            "validatorNoSaveOnError": true
                        },
                        {
                            "type": "color",
                            "attr": "lineColor",
                            "label": "Color",
                            "xs": 12,
                            "sm": 12,
                            "md": 2,
                            "lg": 2,
                            "xl": 2,
                            "default": "#FF0000",
                            "help": "Line color of chart"
                        },
                        {
                            "type": "color",
                            "attr": "backgroundColor",
                            "label": "Background color",
                            "xs": 12,
                            "sm": 12,
                            "md": 2,
                            "lg": 2,
                            "xl": 2,
                            "default": "#000000"
                        },
                        {
                            "newLine": true,
                            "attr": "display",
                            "type": "select",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4,
                            "options": [
                                {
                                    "label": "Line",
                                    "value": "line"
                                },
                                {
                                    "label": "Bar",
                                    "value": "bar"
                                }
                            ],
                            "default": "line",
                            "label": "Display as"
                        },
                        {
                            "newLine": true,
                            "attr": "mode",
                            "type": "select",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4,
                            "options": [
                                {
                                    "label": "Last values",
                                    "value": "last"
                                },
                                {
                                    "label": "Aggregated values",
                                    "value": "aggregate"
                                }
                            ],
                            "default": "last",
                            "label": "Mode"
                        },
                        {
                            "hidden": "data.mode !== 'aggregate'",
                            "attr": "aggregation",
                            "type": "select",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4,
                            "options": [
                                {
                                    "label": "Average",
                                    "value": "average"
                                },
                                {
                                    "label": "Min",
                                    "value": "min"
                                },
                                {
                                    "label": "Max",
                                    "value": "max"
                                },
                                {
                                    "label": "Count",
                                    "value": "count"
                                }
                            ],
                            "default": "average",
                            "label": "Aggregation"
                        },
                        {
                            "hidden": "data.mode !== 'aggregate'",
                            "type": "number",
                            "attr": "step",
                            "label": "Step size",
                            "xs": 12,
                            "sm": 12,
                            "md": 2,
                            "lg": 2,
                            "xl": 2,
                            "default": 3600,
                            "min": 1,
                            "help": "seconds"
                        },
                        {
                            "hidden": "!globalData.customPositions",
                            "newLine": true,
                            "type": "header",
                            "attr": "_expertOptionsHeader",
                            "text": "Expert options",
                            "size": 3,
                            "xs": 12,
                            "sm": 12,
                            "md": 12,
                            "lg": 12,
                            "xl": 12
                        },
                        {
                            "hidden": "!globalData.customPositions",
                            "type": "number",
                            "attr": "position",
                            "label": "Position",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4,
                            "default": 0,
                            "min": 0,
                            "step": 1
                        }
                    ]
                },
                "historyAppsRefreshInterval": {
                    "hidden": "!!data.foreignSettingsInstance",
                    "type": "number",
                    "label": "Refresh interval (in seconds)",
                    "min": 60,
                    "max": 86400,
                    "xs": 12,
                    "sm": 12,
                    "md": 4,
                    "lg": 4,
                    "xl": 4
                },
                "_dividerBottom": {
                    "hidden": "!!data.foreignSettingsInstance",
                    "newLine": true,
                    "type": "divider",
                    "xs": 12,
                    "sm": 12,
                    "md": 12,
                    "lg": 12,
                    "xl": 12
                },
                "autoDeleteForeignApps": {
                    "hidden": "!!data.foreignSettingsInstance",
                    "newLine": true,
                    "type": "checkbox",
                    "label": "Automatically delete unknown apps",
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 6,
                    "xl": 6
                },
                "removeAppsOnStop": {
                    "hidden": "!!data.foreignSettingsInstance",
                    "type": "checkbox",
                    "label": "Delete apps when instance is stopped",
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 6,
                    "xl": 6
                }
            }
        },
        "_expertOptions": {
            "type": "panel",
            "label": "Expert options",
            "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuNC4yIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIzIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMjU2IDMyYzE0LjIgMCAyNy4zIDcuNSAzNC41IDE5LjhsMjE2IDM2OGM3LjMgMTIuNCA3LjMgMjcuNyAuMiA0MC4xUzQ4Ni4zIDQ4MCA0NzIgNDgwSDQwYy0xNC4zIDAtMjcuNi03LjctMzQuNy0yMC4xcy03LTI3LjggLjItNDAuMWwyMTYtMzY4QzIyOC43IDM5LjUgMjQxLjggMzIgMjU2IDMyem0wIDEyOGMtMTMuMyAwLTI0IDEwLjctMjQgMjRWMjk2YzAgMTMuMyAxMC43IDI0IDI0IDI0czI0LTEwLjcgMjQtMjRWMTg0YzAtMTMuMy0xMC43LTI0LTI0LTI0em0zMiAyMjRhMzIgMzIgMCAxIDAgLTY0IDAgMzIgMzIgMCAxIDAgNjQgMHoiLz48L3N2Zz4=",
            "items": {
                "httpTimeout": {
                    "type": "number",
                    "label": "HTTP timeout",
                    "min": 1,
                    "max": 10,
                    "xs": 12,
                    "sm": 12,
                    "md": 4,
                    "lg": 4,
                    "xl": 4
                },
                "numberFormat": {
                    "newLine": true,
                    "type": "select",
                    "xs": 12,
                    "sm": 12,
                    "md": 4,
                    "lg": 4,
                    "xl": 4,
                    "options": [
                        {
                            "label": "System",
                            "value": "system"
                        },
                        {
                            "label": "xx.xxx,xx",
                            "value": ".,"
                        },
                        {
                            "label": "xx,xxx.xx",
                            "value": ",."
                        },
                        {
                            "label": "xxxxx,xx",
                            "value": ","
                        },
                        {
                            "label": "xxxxx.xx",
                            "value": "."
                        }
                    ],
                    "default": "system",
                    "label": "Number format"
                },
                "customPositions": {
                    "hidden": "!!data.foreignSettingsInstance",
                    "newLine": true,
                    "type": "checkbox",
                    "label": "Own position for each app",
                    "xs": 12,
                    "sm": 12,
                    "md": 4,
                    "lg": 4,
                    "xl": 4
                },
                "_headerExpertApps": {
                    "hidden": "!!data.foreignSettingsInstance",
                    "newLine": true,
                    "type": "header",
                    "text": "Expert Apps",
                    "size": 2,
                    "xs": 12,
                    "sm": 12,
                    "md": 12,
                    "lg": 12,
                    "xl": 12
                },
                "expertApps": {
                    "hidden": "!!data.foreignSettingsInstance",
                    "newLine": true,
                    "type": "accordion",
                    "titleAttr": "name",
                    "xs": 12,
                    "sm": 12,
                    "md": 12,
                    "lg": 12,
                    "xl": 12,
                    "items": [
                        {
                            "type": "text",
                            "attr": "name",
                            "label": "Name",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4,
                            "default": "expert",
                            "help": "Just lower case letters (a-z)",
                            "validator": "/^([a-z]{1,})$/.test(data.name) && !['time', 'date', 'temperature', 'humidity', 'battery'].includes(data.name) && [...globalData.customApps, ...globalData.historyApps, ...globalData.expertApps].filter(app => app.name === data.name).length === 1",
                            "validatorErrorText": "Just lower case letters (a-z)",
                            "validatorNoSaveOnError": true
                        },
                        {
                            "hidden": "!globalData.customPositions",
                            "newLine": true,
                            "type": "header",
                            "attr": "_expertOptionsHeader",
                            "text": "Expert options",
                            "size": 3,
                            "xs": 12,
                            "sm": 12,
                            "md": 12,
                            "lg": 12,
                            "xl": 12
                        },
                        {
                            "hidden": "!globalData.customPositions",
                            "type": "number",
                            "attr": "position",
                            "label": "Position",
                            "xs": 12,
                            "sm": 12,
                            "md": 4,
                            "lg": 4,
                            "xl": 4,
                            "default": 0,
                            "min": 0,
                            "step": 1
                        }
                    ]
                }
            }
        }
    }
}