{
  "title": "Command buttons",
  "image": null,
  "mobileHide": false,
  "mobileOrder": null,
  "configuration": {
    "description": "",
    "widgets": {
      "e51386e9-7ae9-13a9-0920-c6337aa9939c": {
        "typeFullFqn": "system.command_button",
        "type": "rpc",
        "sizeX": 3,
        "sizeY": 1,
        "config": {
          "showTitle": false,
          "backgroundColor": "rgba(255, 255, 255, 0)",
          "color": "rgba(0, 0, 0, 0.87)",
          "padding": "0px",
          "settings": {
            "onClickState": {
              "action": "SET_ATTRIBUTE",
              "executeRpc": {
                "method": "setState",
                "requestTimeout": 5000,
                "requestPersistent": false,
                "persistentPollingInterval": 1000
              },
              "setAttribute": {
                "scope": "SERVER_SCOPE",
                "key": "state"
              },
              "putTimeSeries": {
                "key": "state"
              },
              "valueToData": {
                "type": "CONSTANT",
                "constantValue": "A",
                "valueToDataFunction": "/* Return RPC parameters or attribute/time-series value */\nreturn true;"
              }
            },
            "disabledState": {
              "action": "GET_ATTRIBUTE",
              "defaultValue": false,
              "executeRpc": {
                "method": null,
                "requestTimeout": null,
                "requestPersistent": null,
                "persistentPollingInterval": null
              },
              "getAttribute": {
                "scope": null,
                "key": "state"
              },
              "getTimeSeries": {
                "key": "state"
              },
              "dataToValue": {
                "type": "NONE",
                "dataToValueFunction": "/* Should return boolean value */\nreturn data ? data : \"N/A\";",
                "compareToValue": "A"
              }
            },
            "appearance": {
              "type": "outlined",
              "showLabel": true,
              "label": "Set state to A",
              "showIcon": true,
              "icon": "arrow_outward",
              "iconSize": 24,
              "iconSizeUnit": "px",
              "mainColor": "var(--tb-primary-500)",
              "backgroundColor": "#FFFFFF",
              "autoScale": true,
              "customStyle": {
                "enabled": null,
                "hovered": null,
                "pressed": null,
                "activated": null,
                "disabled": null
              }
            }
          },
          "title": "Command button",
          "dropShadow": false,
          "enableFullscreen": false,
          "widgetStyle": {},
          "actions": {},
          "widgetCss": "",
          "noDataDisplayMessage": "",
          "titleFont": {
            "size": 12,
            "sizeUnit": "px",
            "family": null,
            "weight": null,
            "style": null,
            "lineHeight": "1.6"
          },
          "showTitleIcon": false,
          "titleTooltip": "",
          "titleStyle": {
            "fontSize": "16px",
            "fontWeight": 400
          },
          "pageSize": 1024,
          "titleIcon": "",
          "iconColor": "rgba(0, 0, 0, 0.87)",
          "iconSize": "14px",
          "configMode": "basic",
          "borderRadius": "4px",
          "datasources": [],
          "targetDevice": {
            "type": "entity",
            "entityAliasId": "143f177f-6aa9-ed6a-f4cc-973faad8640e"
          }
        },
        "row": 0,
        "col": 0,
        "id": "e51386e9-7ae9-13a9-0920-c6337aa9939c"
      },
      "69e65788-b1ae-2553-4382-822dfb88f714": {
        "typeFullFqn": "system.command_button",
        "type": "rpc",
        "sizeX": 3,
        "sizeY": 1,
        "config": {
          "showTitle": false,
          "backgroundColor": "rgba(255, 255, 255, 0)",
          "color": "rgba(0, 0, 0, 0.87)",
          "padding": "0px",
          "settings": {
            "onClickState": {
              "action": "SET_ATTRIBUTE",
              "executeRpc": {
                "method": "setState",
                "requestTimeout": 5000,
                "requestPersistent": false,
                "persistentPollingInterval": 1000
              },
              "setAttribute": {
                "scope": "SERVER_SCOPE",
                "key": "state"
              },
              "putTimeSeries": {
                "key": "state"
              },
              "valueToData": {
                "type": "CONSTANT",
                "constantValue": "B",
                "valueToDataFunction": "/* Return RPC parameters or attribute/time-series value */\nreturn true;"
              }
            },
            "disabledState": {
              "action": "GET_ATTRIBUTE",
              "defaultValue": false,
              "executeRpc": {
                "method": null,
                "requestTimeout": null,
                "requestPersistent": null,
                "persistentPollingInterval": null
              },
              "getAttribute": {
                "scope": null,
                "key": "state"
              },
              "getTimeSeries": {
                "key": "state"
              },
              "dataToValue": {
                "type": "NONE",
                "dataToValueFunction": "/* Should return boolean value */\nreturn data;",
                "compareToValue": "B"
              }
            },
            "appearance": {
              "type": "outlined",
              "showLabel": true,
              "label": "Set state to B",
              "showIcon": true,
              "icon": "arrow_outward",
              "iconSize": 24,
              "iconSizeUnit": "px",
              "mainColor": "var(--tb-primary-500)",
              "backgroundColor": "#FFFFFF",
              "autoScale": true,
              "customStyle": {
                "enabled": null,
                "hovered": null,
                "pressed": null,
                "activated": null,
                "disabled": null
              }
            }
          },
          "title": "Command button",
          "dropShadow": false,
          "enableFullscreen": false,
          "widgetStyle": {},
          "actions": {},
          "widgetCss": "",
          "noDataDisplayMessage": "",
          "titleFont": {
            "size": 12,
            "sizeUnit": "px",
            "family": null,
            "weight": null,
            "style": null,
            "lineHeight": "1.6"
          },
          "showTitleIcon": false,
          "titleTooltip": "",
          "titleStyle": {
            "fontSize": "16px",
            "fontWeight": 400
          },
          "pageSize": 1024,
          "titleIcon": "",
          "iconColor": "rgba(0, 0, 0, 0.87)",
          "iconSize": "14px",
          "configMode": "basic",
          "borderRadius": "4px",
          "datasources": [],
          "targetDevice": {
            "type": "entity",
            "entityAliasId": "143f177f-6aa9-ed6a-f4cc-973faad8640e"
          }
        },
        "row": 0,
        "col": 0,
        "id": "69e65788-b1ae-2553-4382-822dfb88f714"
      },
      "3fd3e051-3ff3-cfa9-f723-b134121242d5": {
        "typeFullFqn": "system.cards.html_value_card",
        "type": "latest",
        "sizeX": 7.5,
        "sizeY": 3,
        "config": {
          "datasources": [
            {
              "type": "entity",
              "name": "",
              "entityAliasId": "143f177f-6aa9-ed6a-f4cc-973faad8640e",
              "dataKeys": [
                {
                  "name": "state",
                  "type": "attribute",
                  "label": "state",
                  "color": "#2196f3",
                  "settings": {},
                  "_hash": 0.41324209755078334,
                  "aggregationType": null,
                  "units": null,
                  "decimals": null,
                  "funcBody": null,
                  "usePostProcessing": true,
                  "postFuncBody": "return value ? value : \"undefined\";"
                }
              ],
              "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": 1708519042769,
                "endTimeMs": 1708605442769
              },
              "quickInterval": "CURRENT_DAY"
            },
            "aggregation": {
              "type": "AVG",
              "limit": 25000
            }
          },
          "showTitle": false,
          "backgroundColor": "#fff",
          "color": "rgba(0, 0, 0, 0.87)",
          "padding": "0px",
          "settings": {
            "cardHtml": "<div class='card'>\n    <div class='content'>\n        <div class='value'>\n            State: ${state}.\n        </div>   \n    </div>\n</div>",
            "cardCss": ".card {\n   width: 100%;\n   height: 100%;\n   border: 2px solid #ccc;\n   box-sizing: border-box;\n}\n\n.card .content {\n   padding: 20px;\n   display: flex;\n   flex-direction: row;\n   align-items: center;\n   justify-content: space-around;\n   height: 100%;\n   box-sizing: border-box;\n}\n\n.card .content .column {\n   display: flex;\n   flex-direction: column;    \n   justify-content: space-around;\n   height: 100%;\n}\n\n.card h1 {\n    text-transform: uppercase;\n    color: #999;\n    font-size: 20px;\n    font-weight: bold;\n    margin: 0;\n    padding-bottom: 10px;\n    line-height: 32px;\n}\n\n.card .value {\n    font-size: 38px;\n    font-weight: 200;\n}\n\n.card .description {\n    font-size: 20px;\n    color: #999;\n}\n"
          },
          "title": "HTML Value Card",
          "dropShadow": false,
          "enableFullscreen": true,
          "widgetStyle": {},
          "titleStyle": {
            "fontSize": "16px",
            "fontWeight": 400
          },
          "useDashboardTimewindow": true,
          "showLegend": false,
          "actions": {},
          "displayTimewindow": true
        },
        "row": 0,
        "col": 0,
        "id": "3fd3e051-3ff3-cfa9-f723-b134121242d5"
      }
    },
    "states": {
      "default": {
        "name": "Command buttons",
        "root": true,
        "layouts": {
          "main": {
            "widgets": {
              "e51386e9-7ae9-13a9-0920-c6337aa9939c": {
                "sizeX": 3,
                "sizeY": 1,
                "row": 0,
                "col": 0
              },
              "69e65788-b1ae-2553-4382-822dfb88f714": {
                "sizeX": 3,
                "sizeY": 1,
                "row": 0,
                "col": 3
              },
              "3fd3e051-3ff3-cfa9-f723-b134121242d5": {
                "sizeX": 6,
                "sizeY": 3,
                "row": 1,
                "col": 0
              }
            },
            "gridSettings": {
              "backgroundColor": "#eeeeee",
              "columns": 24,
              "margin": 10,
              "outerMargin": true,
              "backgroundSizeMode": "100%"
            }
          }
        }
      }
    },
    "entityAliases": {
      "143f177f-6aa9-ed6a-f4cc-973faad8640e": {
        "id": "143f177f-6aa9-ed6a-f4cc-973faad8640e",
        "alias": "CurrentUser",
        "filter": {
          "type": "singleEntity",
          "resolveMultiple": false,
          "singleEntity": {
            "entityType": "CURRENT_USER",
            "id": "13814000-1dd2-11b2-8080-808080808080"
          }
        }
      }
    },
    "filters": {},
    "timewindow": {
      "displayValue": "",
      "hideInterval": false,
      "hideLastInterval": false,
      "hideQuickInterval": false,
      "hideAggregation": false,
      "hideAggInterval": false,
      "hideTimezone": false,
      "selectedTab": 0,
      "realtime": {
        "realtimeType": 0,
        "interval": 1000,
        "timewindowMs": 60000,
        "quickInterval": "CURRENT_DAY"
      },
      "history": {
        "historyType": 0,
        "interval": 1000,
        "timewindowMs": 60000,
        "fixedTimewindow": {
          "startTimeMs": 1708514419130,
          "endTimeMs": 1708600819130
        },
        "quickInterval": "CURRENT_DAY"
      },
      "aggregation": {
        "type": "AVG",
        "limit": 25000
      }
    },
    "settings": {
      "stateControllerId": "entity",
      "showTitle": false,
      "showDashboardsSelect": true,
      "showEntitiesSelect": true,
      "showDashboardTimewindow": true,
      "showDashboardExport": true,
      "toolbarAlwaysOpen": true
    }
  },
  "name": "Command buttons"
}