Egen modus på barnerom

Her er den virtuelle bryteren:

{
  "Id": "3r06fmz8hpYecui",
  "ClassId": "3r06fmz8hpYecui",
  "Author": "espenh.no",
  "Version": 0,
  "CreatedAt": "2020-08-25T20:54:08.994842751+02:00",
  "UpdatedAt": "2020-08-25T21:55:27.103354435+02:00",
  "Name": "tobias_night_mode",
  "Group": "tobias",
  "Description": "set tobias room to night mode",
  "Nodes": [
    {
      "Id": "1",
      "Type": "trigger",
      "Label": "button",
      "SuccessTransition": "2",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "pt:j1/mt:cmd/rt:dev/rn:flow/ad:1/sv:out_bin_switch/ad:3r06fmz8hpYecui_0",
      "Service": "out_bin_switch",
      "ServiceInterface": "cmd.binary.set",
      "Config": {
        "InputVariableType": "",
        "IsValueFilterEnabled": false,
        "LookupServiceNameAndLocation": false,
        "PropFilterName": "",
        "PropFilterValue": "",
        "RegisterAsVirtualService": true,
        "Timeout": 0,
        "ValueFilter": {
          "Value": null,
          "ValueType": "bool"
        },
        "ValueJPath": "",
        "ValueJPathResultType": "",
        "VirtualServiceGroup": "ch_0",
        "VirtualServiceProps": null
      },
      "Ui": {
        "nodeType": "",
        "x": 60,
        "y": 209
      }
    },
    {
      "Id": "2",
      "Type": "action",
      "Label": "send response",
      "SuccessTransition": "3",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "pt:j1/mt:evt/rt:dev/rn:flow/ad:1/sv:out_bin_switch/ad:3r06fmz8hpYecui_0",
      "Service": "out_bin_switch",
      "ServiceInterface": "evt.binary.report",
      "Config": {
        "DefaultValue": {
          "Value": "",
          "ValueType": "bool"
        },
        "IsVariableGlobal": false,
        "Props": {},
        "RegisterAsVirtualService": false,
        "ResponseToTopic": "",
        "VariableName": "",
        "VirtualServiceGroup": "ch_0",
        "VirtualServiceProps": {}
      },
      "Ui": {
        "nodeType": "",
        "x": 65,
        "y": 366
      }
    },
    {
      "Id": "3",
      "Type": "set_variable",
      "Label": "set global variable",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "DefaultValue": {
          "Value": 0,
          "ValueType": ""
        },
        "Name": "tobias_nightmode",
        "UpdateGlobal": true,
        "UpdateInputMsg": false
      },
      "Ui": {
        "nodeType": "",
        "x": 72,
        "y": 536
      }
    }
  ],
  "Settings": null,
  "IsDisabled": false,
  "IsDefault": false,
  "ParallelExecution": "parallel"
}

Her er bevegelse flowen:

{
  "Id": "69h3NQpUyAlHepH",
  "ClassId": "Nqo6aLFaaFoKgW7",
  "Author": "espenh.no",
  "Version": 0,
  "CreatedAt": "2020-08-25T21:28:41.471404094+02:00",
  "UpdatedAt": "2020-08-25T22:26:08.902725034+02:00",
  "Name": "sensor_presence automations - tobias",
  "Group": "sensor_presence",
  "Description": "",
  "Nodes": [
    {
      "Id": "1",
      "Type": "trigger",
      "Label": "sensor_presence",
      "SuccessTransition": "8",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "pt:j1/mt:evt/rt:dev/rn:zw/ad:1/sv:sensor_presence/ad:29_0",
      "Service": "sensor_presence",
      "ServiceInterface": "evt.presence.report",
      "Config": {
        "InputVariableType": "",
        "IsValueFilterEnabled": false,
        "LookupServiceNameAndLocation": false,
        "PropFilterName": "",
        "PropFilterValue": "",
        "RegisterAsVirtualService": false,
        "Timeout": 0,
        "ValueFilter": {
          "Value": true,
          "ValueType": ""
        },
        "ValueJPath": "",
        "ValueJPathResultType": "",
        "VirtualServiceGroup": "",
        "VirtualServiceProps": null
      },
      "Ui": {
        "nodeType": "",
        "x": 227,
        "y": 152
      }
    },
    {
      "Id": "2",
      "Type": "action",
      "Label": "out_lvl_switch ON (Last known value)",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "pt:j1/mt:cmd/rt:dev/rn:zw/ad:1/sv:out_lvl_switch/ad:27_1",
      "Service": "out_lvl_switch",
      "ServiceInterface": "cmd.binary.set",
      "Config": {
        "DefaultValue": {
          "Value": true,
          "ValueType": "bool"
        },
        "IsVariableGlobal": false,
        "Props": {},
        "RegisterAsVirtualService": false,
        "ResponseToTopic": "",
        "VariableName": "",
        "VirtualServiceGroup": "",
        "VirtualServiceProps": {}
      },
      "Ui": {
        "nodeType": "",
        "x": 58,
        "y": 731
      }
    },
    {
      "Id": "4",
      "Type": "wait",
      "Label": "wait 5 min",
      "SuccessTransition": "5",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": 300000,
      "Ui": {
        "nodeType": "",
        "x": 343,
        "y": 716
      }
    },
    {
      "Id": "5",
      "Type": "action",
      "Label": "out_lvl_switch OFF",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "pt:j1/mt:cmd/rt:dev/rn:zw/ad:1/sv:out_lvl_switch/ad:27_1",
      "Service": "out_lvl_switch",
      "ServiceInterface": "cmd.binary.set",
      "Config": {
        "DefaultValue": {
          "Value": false,
          "ValueType": "bool"
        },
        "IsVariableGlobal": false,
        "Props": {},
        "RegisterAsVirtualService": false,
        "ResponseToTopic": "",
        "VariableName": "",
        "VirtualServiceGroup": "",
        "VirtualServiceProps": {}
      },
      "Ui": {
        "nodeType": "",
        "x": 340,
        "y": 871
      }
    },
    {
      "Id": "6",
      "Type": "if",
      "Label": "if presence = true",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": [
          {
            "BooleanOperator": "",
            "LeftVariableIsGlobal": false,
            "LeftVariableName": "",
            "Operand": "eq",
            "RightVariable": {
              "Value": true,
              "ValueType": "bool"
            }
          }
        ],
        "FalseTransition": "7",
        "TrueTransition": "2"
      },
      "Ui": {
        "nodeType": "",
        "x": 73,
        "y": 554
      }
    },
    {
      "Id": "7",
      "Type": "if",
      "Label": "if presence = false",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": [
          {
            "BooleanOperator": "",
            "LeftVariableIsGlobal": false,
            "LeftVariableName": "",
            "Operand": "eq",
            "RightVariable": {
              "Value": false,
              "ValueType": "bool"
            }
          }
        ],
        "FalseTransition": "",
        "TrueTransition": "4"
      },
      "Ui": {
        "nodeType": "",
        "x": 342,
        "y": 552
      }
    },
    {
      "Id": "8",
      "Type": "if",
      "Label": "if home & tobias_nightmode false",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": [
          {
            "BooleanOperator": "and",
            "LeftVariableIsGlobal": true,
            "LeftVariableName": "fh.home.mode",
            "Operand": "eq",
            "RightVariable": {
              "Value": "home",
              "ValueType": "string"
            }
          },
          {
            "BooleanOperator": "",
            "LeftVariableIsGlobal": true,
            "LeftVariableName": "tobias_nightmode",
            "Operand": "eq",
            "RightVariable": {
              "Value": false,
              "ValueType": "bool"
            }
          }
        ],
        "FalseTransition": "",
        "TrueTransition": "6"
      },
      "Ui": {
        "nodeType": "",
        "x": 220,
        "y": 316
      }
    }
  ],
  "Settings": null,
  "IsDisabled": false,
  "IsDefault": false,
  "ParallelExecution": "keep_last"
}