{
  "title": "WS 101 Smart Button",
  "image": null,
  "mobileHide": false,
  "mobileOrder": null,
  "configuration": {
    "widgets": {
      "425be298-b998-070e-6ba8-0342e4112a32": {
        "typeFullFqn": "system.charts.basic_timeseries",
        "type": "timeseries",
        "title": "New widget",
        "image": null,
        "description": null,
        "sizeX": 8,
        "sizeY": 5,
        "config": {
          "datasources": [
            {
              "type": "entity",
              "name": "function",
              "deviceId": "32f343c0-4406-11ee-9a80-5b71969a2546",
              "entityAliasId": "4d3d3b59-a5e6-efb3-23c0-b4f715db4d06",
              "dataKeys": [
                {
                  "name": "press",
                  "type": "timeseries",
                  "label": "Press",
                  "color": "#4CAF50",
                  "settings": {
                    "hideDataByDefault": false,
                    "disableDataHiding": false,
                    "removeFromLegend": false,
                    "excludeFromStacking": false,
                    "showLines": true,
                    "lineWidth": 1,
                    "fillLines": false,
                    "showPoints": true,
                    "showPointsLineWidth": 5,
                    "showPointsRadius": 3,
                    "showPointShape": "circle",
                    "pointShapeFormatter": "var size = radius * Math.sqrt(Math.PI) / 2;\nctx.moveTo(x - size, y - size);\nctx.lineTo(x + size, y + size);\nctx.moveTo(x - size, y + size);\nctx.lineTo(x + size, y - size);",
                    "showSeparateAxis": false,
                    "axisPosition": "left",
                    "comparisonSettings": {
                      "showValuesForComparison": true,
                      "comparisonValuesLabel": "",
                      "color": ""
                    },
                    "thresholds": []
                  },
                  "_hash": 0.09700806288952801,
                  "decimals": 0,
                  "aggregationType": null,
                  "funcBody": null,
                  "usePostProcessing": true,
                  "postFuncBody": "if (value == \"short\") {\n    return 1;\n} else if (value == \"long\") {\n    return 2;\n} else if (value == \"double\") {\n    return 3;\n}\n\nreturn 0;",
                  "units": null
                }
              ],
              "alarmFilterConfig": {
                "statusList": [
                  "ACTIVE"
                ]
              },
              "latestDataKeys": []
            }
          ],
          "timewindow": {
            "realtime": {
              "timewindowMs": 60000
            }
          },
          "showTitle": true,
          "backgroundColor": "#fff",
          "color": "rgba(0, 0, 0, 0.87)",
          "padding": "8px",
          "settings": {
            "stack": false,
            "enableSelection": true,
            "fontSize": 10,
            "fontColor": "#545454",
            "showTooltip": true,
            "tooltipIndividual": false,
            "tooltipCumulative": false,
            "hideZeros": false,
            "grid": {
              "verticalLines": true,
              "horizontalLines": true,
              "outlineWidth": 1,
              "color": "#545454",
              "backgroundColor": null,
              "tickColor": "#DDDDDD"
            },
            "xaxis": {
              "title": null,
              "showLabels": true,
              "color": "#545454"
            },
            "yaxis": {
              "min": 0,
              "max": 3,
              "title": null,
              "showLabels": true,
              "color": "#545454",
              "tickSize": null,
              "tickDecimals": 0,
              "ticksFormatter": ""
            },
            "shadowSize": 4,
            "smoothLines": false,
            "comparisonEnabled": false,
            "showLegend": false,
            "customLegendEnabled": false,
            "legendConfig": {
              "direction": "column",
              "position": "bottom",
              "sortDataKeys": false,
              "showMin": false,
              "showMax": false,
              "showAvg": true,
              "showTotal": false,
              "showLatest": false
            }
          },
          "title": "Button press historical data",
          "dropShadow": false,
          "enableFullscreen": false,
          "titleStyle": {
            "fontSize": "16px",
            "fontWeight": 400
          },
          "configMode": "advanced",
          "actions": {},
          "showTitleIcon": false,
          "titleIcon": "thermostat",
          "iconColor": "#1F6BDD",
          "useDashboardTimewindow": true,
          "displayTimewindow": true,
          "titleFont": null,
          "titleColor": null,
          "enableDataExport": true,
          "titleTooltip": "",
          "widgetStyle": {},
          "widgetCss": "",
          "pageSize": 1024,
          "noDataDisplayMessage": ""
        },
        "row": 0,
        "col": 0,
        "id": "425be298-b998-070e-6ba8-0342e4112a32"
      },
      "39f6556b-0f1f-47cf-6074-4cbc495cb927": {
        "typeFullFqn": "system.cards.value_card",
        "type": "latest",
        "title": "New widget",
        "image": null,
        "description": null,
        "sizeX": 3,
        "sizeY": 3,
        "config": {
          "datasources": [
            {
              "type": "entity",
              "name": "function",
              "entityAliasId": "4d3d3b59-a5e6-efb3-23c0-b4f715db4d06",
              "dataKeys": [
                {
                  "name": "press",
                  "type": "timeseries",
                  "label": "Last press value",
                  "color": "#2196f3",
                  "settings": {},
                  "_hash": 0.427552175753269,
                  "aggregationType": "NONE",
                  "units": null,
                  "decimals": null,
                  "funcBody": null,
                  "usePostProcessing": false,
                  "postFuncBody": null
                }
              ],
              "alarmFilterConfig": {
                "statusList": [
                  "ACTIVE"
                ]
              }
            }
          ],
          "timewindow": {
            "displayValue": "",
            "selectedTab": 0,
            "realtime": {
              "realtimeType": 1,
              "interval": 1000,
              "timewindowMs": 60000,
              "quickInterval": "CURRENT_DAY"
            },
            "history": {
              "historyType": 0,
              "interval": 1000,
              "timewindowMs": 60000,
              "fixedTimewindow": {
                "startTimeMs": 1693204185085,
                "endTimeMs": 1693290585085
              },
              "quickInterval": "CURRENT_DAY"
            },
            "aggregation": {
              "type": "AVG",
              "limit": 25000
            }
          },
          "showTitle": false,
          "backgroundColor": "rgba(0, 0, 0, 0)",
          "color": "rgba(0, 0, 0, 0.87)",
          "padding": "0px",
          "settings": {
            "layout": "centered",
            "showLabel": true,
            "labelFont": {
              "family": "Roboto",
              "size": 16,
              "sizeUnit": "px",
              "style": "normal",
              "weight": "500"
            },
            "labelColor": {
              "type": "constant",
              "color": "rgba(0, 0, 0, 0.87)",
              "colorFunction": "var temperature = value;\nif (typeof temperature !== 'undefined') {\n  var percent = (temperature + 60)/120 * 100;\n  return tinycolor.mix('blue', 'red', percent).toHexString();\n}\nreturn 'blue';"
            },
            "showIcon": true,
            "iconSize": 80,
            "iconSizeUnit": "px",
            "icon": "radio_button_checked",
            "iconColor": {
              "type": "function",
              "color": "#000000",
              "rangeList": [
                {
                  "from": null,
                  "to": null,
                  "color": "rgba(0,0,0,0.87)"
                }
              ],
              "colorFunction": "if (value == \"short\") {\n    return \"yellow\";\n} else if (value == \"long\") {\n    return \"orange\";\n} else if (value == \"double\") {\n    return \"red\";\n}\n\nreturn \"black;\""
            },
            "valueFont": {
              "family": "Roboto",
              "size": 52,
              "sizeUnit": "px",
              "style": "normal",
              "weight": "500"
            },
            "valueColor": {
              "type": "constant",
              "color": "rgba(0, 0, 0, 0.87)",
              "colorFunction": "var temperature = value;\nif (typeof temperature !== 'undefined') {\n  var percent = (temperature + 60)/120 * 100;\n  return tinycolor.mix('blue', 'red', percent).toHexString();\n}\nreturn 'blue';"
            },
            "showDate": true,
            "dateFormat": {
              "format": null,
              "lastUpdateAgo": true,
              "custom": false
            },
            "dateFont": {
              "family": "Roboto",
              "size": 12,
              "sizeUnit": "px",
              "style": "normal",
              "weight": "500",
              "lineHeight": "1.33"
            },
            "dateColor": {
              "type": "constant",
              "color": "rgba(0, 0, 0, 0.38)",
              "colorFunction": "var temperature = value;\nif (typeof temperature !== 'undefined') {\n  var percent = (temperature + 60)/120 * 100;\n  return tinycolor.mix('blue', 'red', percent).toHexString();\n}\nreturn 'blue';"
            },
            "background": {
              "type": "color",
              "color": "#fff",
              "overlay": {
                "enabled": false,
                "color": "rgba(255,255,255,0.72)",
                "blur": 3
              }
            }
          },
          "title": "Value card",
          "dropShadow": false,
          "enableFullscreen": false,
          "titleStyle": {
            "fontSize": "16px",
            "fontWeight": 400
          },
          "units": null,
          "decimals": 0,
          "useDashboardTimewindow": true,
          "showLegend": false,
          "widgetStyle": {},
          "actions": {},
          "configMode": "advanced",
          "displayTimewindow": true,
          "margin": "0px",
          "borderRadius": "0px",
          "widgetCss": "",
          "pageSize": 1024,
          "noDataDisplayMessage": "",
          "enableDataExport": false,
          "showTitleIcon": false,
          "titleTooltip": "",
          "titleFont": {
            "size": 12,
            "sizeUnit": "px",
            "family": null,
            "weight": null,
            "style": null,
            "lineHeight": "1.6"
          },
          "titleIcon": "",
          "iconColor": "rgba(0, 0, 0, 0.87)",
          "iconSize": "14px",
          "timewindowStyle": {
            "showIcon": true,
            "iconSize": "14px",
            "icon": "query_builder",
            "iconPosition": "left",
            "font": {
              "size": 12,
              "sizeUnit": "px",
              "family": null,
              "weight": null,
              "style": null,
              "lineHeight": "1"
            },
            "color": null
          }
        },
        "row": 0,
        "col": 0,
        "id": "39f6556b-0f1f-47cf-6074-4cbc495cb927"
      },
      "cc6e9c6c-fbbc-36ec-54ce-e7289705d40b": {
        "typeFullFqn": "system.cards.value_card",
        "type": "latest",
        "title": "New widget",
        "image": null,
        "description": null,
        "sizeX": 3,
        "sizeY": 3,
        "config": {
          "datasources": [
            {
              "type": "entity",
              "name": "function",
              "entityAliasId": "4d3d3b59-a5e6-efb3-23c0-b4f715db4d06",
              "dataKeys": [
                {
                  "name": "battery",
                  "type": "timeseries",
                  "label": "Battery level",
                  "color": "#2196f3",
                  "settings": {},
                  "_hash": 0.35216305811790416
                }
              ],
              "alarmFilterConfig": {
                "statusList": [
                  "ACTIVE"
                ]
              }
            }
          ],
          "timewindow": {
            "displayValue": "",
            "selectedTab": 0,
            "realtime": {
              "realtimeType": 1,
              "interval": 1000,
              "timewindowMs": 60000,
              "quickInterval": "CURRENT_DAY"
            },
            "history": {
              "historyType": 0,
              "interval": 1000,
              "timewindowMs": 60000,
              "fixedTimewindow": {
                "startTimeMs": 1693204751649,
                "endTimeMs": 1693291151649
              },
              "quickInterval": "CURRENT_DAY"
            },
            "aggregation": {
              "type": "AVG",
              "limit": 25000
            }
          },
          "showTitle": false,
          "backgroundColor": "rgba(0, 0, 0, 0)",
          "color": "rgba(0, 0, 0, 0.87)",
          "padding": "0px",
          "settings": {
            "layout": "square",
            "showLabel": true,
            "labelFont": {
              "family": "Roboto",
              "size": 16,
              "sizeUnit": "px",
              "style": "normal",
              "weight": "500"
            },
            "labelColor": {
              "type": "constant",
              "color": "rgba(0, 0, 0, 0.87)",
              "colorFunction": "var temperature = value;\nif (typeof temperature !== 'undefined') {\n  var percent = (temperature + 60)/120 * 100;\n  return tinycolor.mix('blue', 'red', percent).toHexString();\n}\nreturn 'blue';"
            },
            "showIcon": true,
            "iconSize": 40,
            "iconSizeUnit": "px",
            "icon": "battery_std",
            "iconColor": {
              "type": "range",
              "color": "#FF5454",
              "rangeList": [
                {
                  "from": 0,
                  "to": 20,
                  "color": "rgb(244, 67, 54)"
                },
                {
                  "from": 20,
                  "to": 30,
                  "color": "rgb(255, 180, 0)"
                },
                {
                  "from": 30,
                  "to": 40,
                  "color": "rgba(249, 255, 0, 0.87)"
                },
                {
                  "from": 40,
                  "to": 60,
                  "color": "rgba(162, 255, 0, 0.87)"
                },
                {
                  "from": 60,
                  "to": 101,
                  "color": "rgba(29, 255, 0, 0.87)"
                }
              ],
              "colorFunction": "var battery = value;\nif (typeof battery !== 'undefined') {\n  return tinycolor.mix('red', 'green',battery).toHexString();\n}\nreturn 'red';"
            },
            "valueFont": {
              "family": "Roboto",
              "size": 52,
              "sizeUnit": "px",
              "style": "normal",
              "weight": "500"
            },
            "valueColor": {
              "type": "constant",
              "color": "rgba(0, 0, 0, 0.87)",
              "colorFunction": "var temperature = value;\nif (typeof temperature !== 'undefined') {\n  var percent = (temperature + 60)/120 * 100;\n  return tinycolor.mix('blue', 'red', percent).toHexString();\n}\nreturn 'blue';"
            },
            "showDate": true,
            "dateFormat": {
              "format": null,
              "lastUpdateAgo": true,
              "custom": false
            },
            "dateFont": {
              "family": "Roboto",
              "size": 12,
              "sizeUnit": "px",
              "style": "normal",
              "weight": "500"
            },
            "dateColor": {
              "type": "constant",
              "color": "rgba(0, 0, 0, 0.38)",
              "colorFunction": "var temperature = value;\nif (typeof temperature !== 'undefined') {\n  var percent = (temperature + 60)/120 * 100;\n  return tinycolor.mix('blue', 'red', percent).toHexString();\n}\nreturn 'blue';"
            },
            "background": {
              "type": "color",
              "color": "#fff",
              "overlay": {
                "enabled": false,
                "color": "rgba(255,255,255,0.72)",
                "blur": 3
              }
            }
          },
          "title": "Value card",
          "dropShadow": false,
          "enableFullscreen": false,
          "titleStyle": {
            "fontSize": "16px",
            "fontWeight": 400
          },
          "units": "%",
          "decimals": 0,
          "useDashboardTimewindow": true,
          "showLegend": false,
          "widgetStyle": {},
          "actions": {},
          "configMode": "advanced",
          "displayTimewindow": true,
          "margin": "0px",
          "borderRadius": "0px",
          "widgetCss": "",
          "pageSize": 1024,
          "noDataDisplayMessage": "",
          "enableDataExport": false,
          "showTitleIcon": false,
          "titleTooltip": "",
          "titleFont": {
            "size": 12,
            "sizeUnit": "px",
            "family": null,
            "weight": null,
            "style": null,
            "lineHeight": "1.6"
          },
          "titleIcon": "",
          "iconColor": "rgba(0, 0, 0, 0.87)",
          "iconSize": "14px",
          "timewindowStyle": {
            "showIcon": true,
            "iconSize": "14px",
            "icon": "query_builder",
            "iconPosition": "left",
            "font": {
              "size": 12,
              "sizeUnit": "px",
              "family": null,
              "weight": null,
              "style": null,
              "lineHeight": "1"
            },
            "color": null
          }
        },
        "row": 0,
        "col": 0,
        "id": "cc6e9c6c-fbbc-36ec-54ce-e7289705d40b"
      }
    },
    "states": {
      "default": {
        "name": "WS202 PIR and Light sensor",
        "root": true,
        "layouts": {
          "main": {
            "widgets": {
              "425be298-b998-070e-6ba8-0342e4112a32": {
                "sizeX": 8,
                "sizeY": 5,
                "row": 3,
                "col": 0
              },
              "39f6556b-0f1f-47cf-6074-4cbc495cb927": {
                "sizeX": 4,
                "sizeY": 3,
                "row": 0,
                "col": 0
              },
              "cc6e9c6c-fbbc-36ec-54ce-e7289705d40b": {
                "sizeX": 4,
                "sizeY": 3,
                "row": 0,
                "col": 4
              }
            },
            "gridSettings": {
              "backgroundColor": "#eeeeee",
              "columns": 24,
              "margin": 10,
              "outerMargin": true,
              "backgroundSizeMode": "100%"
            }
          }
        }
      }
    },
    "entityAliases": {
      "4d3d3b59-a5e6-efb3-23c0-b4f715db4d06": {
        "id": "4d3d3b59-a5e6-efb3-23c0-b4f715db4d06",
        "alias": "eui-24e124538b223213",
        "filter": {
          "type": "singleEntity",
          "singleEntity": {
            "entityType": "DEVICE",
            "id": "32f343c0-4406-11ee-9a80-5b71969a2546"
          },
          "resolveMultiple": false
        }
      }
    },
    "filters": {},
    "timewindow": {
      "hideInterval": false,
      "hideLastInterval": false,
      "hideQuickInterval": false,
      "hideAggregation": true,
      "hideAggInterval": false,
      "hideTimezone": false,
      "selectedTab": 0,
      "realtime": {
        "realtimeType": 0,
        "timewindowMs": 300000,
        "quickInterval": "CURRENT_DAY",
        "interval": 7200000
      },
      "aggregation": {
        "type": "NONE",
        "limit": 25000
      },
      "timezone": null
    },
    "settings": {
      "stateControllerId": "entity",
      "showTitle": false,
      "showDashboardsSelect": true,
      "showEntitiesSelect": true,
      "showDashboardTimewindow": true,
      "showDashboardExport": true,
      "toolbarAlwaysOpen": true
    }
  },
  "externalId": null,
  "name": "WS 101 Smart Button"
}