Is is possible to change standard movement flows

When I installed my movement sensor I got two standard flows for power on then power off after 5 minutes - one for home mode and one for sleep mode.

I can exclude lights for the room, but I’d like to change the light level so that it isn’t full power at night - is that possible, or is the source code for the flow available so that I could create a custom flow in Thingsplex with the original as the base?

From my experience there is limited possibilities with editing the automatically created flows.
They are however pretty basic, so it should be fairly easy to create equal/similar flows in TP Flow.

I have a basic flow here that does something similar, sets light on based on presence and then turns off after a couple of minutes.
This sets 75% brightness, but you can alter that under “payload configuration”

{
  "Id": "NxXVI17HnUWfX3k",
  "ClassId": "NxXVI17HnUWfX3k",
  "Author": "",
  "Version": 0,
  "CreatedAt": "2021-07-28T10:44:38.033594282+02:00",
  "UpdatedAt": "2021-10-27T22:42:09.528506471+02:00",
  "Name": "Laundry: Trigger lights on presence ",
  "Group": "sensor_presence",
  "Description": "turn on lights in the laundry room when there is presence",
  "Nodes": [
    {
      "Id": "1",
      "Type": "trigger",
      "Label": "laundry sensor presence",
      "SuccessTransition": "2",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "pt:j1/mt:evt/rt:dev/rn:zigbee/ad:1/sv:sensor_presence/ad:8_35",
      "Service": "sensor_presence",
      "ServiceInterface": "evt.presence.report",
      "Config": {
        "ConnectorID": "",
        "InputVariableType": "",
        "IsValueFilterEnabled": false,
        "LookupServiceNameAndLocation": false,
        "PropFilterName": "",
        "PropFilterValue": "",
        "RegisterAsVirtualService": false,
        "Timeout": 0,
        "ValueFilter": {
          "Value": null,
          "ValueType": "bool"
        },
        "ValueJPath": "",
        "ValueJPathResultType": "",
        "VirtualServiceGroup": "",
        "VirtualServiceProps": null
      },
      "Ui": {
        "nodeType": "",
        "x": 275,
        "y": 216
      },
      "TypeAlias": "Trigger"
    },
    {
      "Id": "2",
      "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": "4",
        "TrueTransition": "3"
      },
      "Ui": {
        "nodeType": "",
        "x": 156,
        "y": 439
      },
      "TypeAlias": "If condition"
    },
    {
      "Id": "3",
      "Type": "action",
      "Label": "downlights on 75%",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "pt:j1/mt:cmd/rt:dev/rn:zw/ad:1/sv:out_lvl_switch/ad:32_0",
      "Service": "out_lvl_switch",
      "ServiceInterface": "cmd.lvl.set",
      "Config": {
        "DefaultValue": {
          "Value": 75,
          "ValueType": "int"
        },
        "IsVariableGlobal": false,
        "Props": {},
        "RegisterAsVirtualService": false,
        "ResponseToTopic": "",
        "VariableName": "",
        "VirtualServiceGroup": "",
        "VirtualServiceProps": {}
      },
      "Ui": {
        "nodeType": "",
        "x": 112,
        "y": 855
      },
      "TypeAlias": "Action"
    },
    {
      "Id": "4",
      "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": "5"
      },
      "Ui": {
        "nodeType": "",
        "x": 436,
        "y": 443
      },
      "TypeAlias": "If condition"
    },
    {
      "Id": "5",
      "Type": "wait",
      "Label": "wait 3 min",
      "SuccessTransition": "6",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": 180000,
      "Ui": {
        "nodeType": "",
        "x": 438,
        "y": 659
      },
      "TypeAlias": "Delay"
    },
    {
      "Id": "6",
      "Type": "action",
      "Label": "downlights off",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "pt:j1/mt:cmd/rt:dev/rn:zw/ad:1/sv:out_lvl_switch/ad:32_0",
      "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": 431,
        "y": 860
      },
      "TypeAlias": "Action"
    }
  ],
  "Settings": null,
  "IsDisabled": false,
  "IsDefault": false,
  "ParallelExecution": "keep_last"
}

I also have this flow, similar but more advanced. It sets different levels based on if the mode is “home” or “sleep” AND it checks if its daytime or not.

{
  "Id": "nygssIePHEWAHOB",
  "ClassId": "qB8sywv1YTasTJn",
  "Author": "espenh.no",
  "Version": 0,
  "CreatedAt": "2021-07-27T14:10:20.387801119+02:00",
  "UpdatedAt": "2021-10-27T22:43:45.242080605+02:00",
  "Name": "Walk-in: Trigger lights on presence",
  "Group": "sensor_presence",
  "Description": "",
  "Nodes": [
    {
      "Id": "4",
      "Type": "wait",
      "Label": "wait 2 min",
      "SuccessTransition": "18",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": 120000,
      "Ui": {
        "nodeType": "",
        "x": 353,
        "y": 1092
      },
      "TypeAlias": "Delay"
    },
    {
      "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": "17"
      },
      "Ui": {
        "nodeType": "",
        "x": 46,
        "y": 955
      },
      "TypeAlias": "If condition"
    },
    {
      "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": 335,
        "y": 935
      },
      "TypeAlias": "If condition"
    },
    {
      "Id": "8",
      "Type": "if",
      "Label": "if home",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": [
          {
            "BooleanOperator": "",
            "LeftVariableIsGlobal": true,
            "LeftVariableName": "fh.home.mode",
            "Operand": "eq",
            "RightVariable": {
              "Value": "home",
              "ValueType": "string"
            }
          }
        ],
        "FalseTransition": "9",
        "TrueTransition": "16"
      },
      "Ui": {
        "nodeType": "",
        "x": 220,
        "y": 316
      },
      "TypeAlias": "If condition"
    },
    {
      "Id": "9",
      "Type": "if",
      "Label": "if sleep",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": [
          {
            "BooleanOperator": "",
            "LeftVariableIsGlobal": true,
            "LeftVariableName": "fh.home.mode",
            "Operand": "eq",
            "RightVariable": {
              "Value": "sleep",
              "ValueType": "string"
            }
          }
        ],
        "FalseTransition": "",
        "TrueTransition": "10"
      },
      "Ui": {
        "nodeType": "",
        "x": 732,
        "y": 325
      },
      "TypeAlias": "If condition"
    },
    {
      "Id": "10",
      "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": "13",
        "TrueTransition": "12"
      },
      "Ui": {
        "nodeType": "",
        "x": 629,
        "y": 910
      },
      "TypeAlias": "If condition"
    },
    {
      "Id": "12",
      "Type": "action",
      "Label": "out_lvl_switch cmd.lvl.set 7%",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "pt:j1/mt:cmd/rt:dev/rn:zw/ad:1/sv:out_lvl_switch/ad:25_0",
      "Service": "out_lvl_switch",
      "ServiceInterface": "cmd.lvl.set",
      "Config": {
        "DefaultValue": {
          "Value": 7,
          "ValueType": "int"
        },
        "IsVariableGlobal": false,
        "Props": {},
        "RegisterAsVirtualService": false,
        "ResponseToTopic": "",
        "VariableName": "",
        "VirtualServiceGroup": "",
        "VirtualServiceProps": {}
      },
      "Ui": {
        "nodeType": "",
        "x": 610,
        "y": 1112
      },
      "TypeAlias": "Action"
    },
    {
      "Id": "13",
      "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": "14"
      },
      "Ui": {
        "nodeType": "",
        "x": 878,
        "y": 910
      },
      "TypeAlias": "If condition"
    },
    {
      "Id": "14",
      "Type": "wait",
      "Label": "wait 1 min",
      "SuccessTransition": "15",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": 60000,
      "Ui": {
        "nodeType": "",
        "x": 895,
        "y": 1098
      },
      "TypeAlias": "Delay"
    },
    {
      "Id": "15",
      "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:25_0",
      "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": 881,
        "y": 1274
      },
      "TypeAlias": "Action"
    },
    {
      "Id": "16",
      "Type": "iftime",
      "Label": "Daytime",
      "SuccessTransition": "6",
      "TimeoutTransition": "",
      "ErrorTransition": "10",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": [
          {
            "Action": "a",
            "From": "07:00",
            "To": "21:59",
            "Weekday": "1"
          },
          {
            "Action": "a",
            "From": "07:00",
            "To": "21:59",
            "Weekday": "2"
          },
          {
            "Action": "a",
            "From": "07:00",
            "To": "21:59",
            "Weekday": "3"
          },
          {
            "Action": "a",
            "From": "07:00",
            "To": "21:59",
            "Weekday": "4"
          },
          {
            "Action": "a",
            "From": "07:00",
            "To": "21:59",
            "Weekday": "5"
          },
          {
            "Action": "a",
            "From": "07:00",
            "To": "21:59",
            "Weekday": "6"
          },
          {
            "Action": "a",
            "From": "07:00",
            "To": "21:59",
            "Weekday": "0"
          }
        ]
      },
      "Ui": {
        "nodeType": "",
        "x": 80,
        "y": 594
      },
      "TypeAlias": "Time filter"
    },
    {
      "Id": "17",
      "Type": "action",
      "Label": "lights 60%",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "pt:j1/mt:cmd/rt:dev/rn:zw/ad:1/sv:out_lvl_switch/ad:25_0",
      "Service": "out_lvl_switch",
      "ServiceInterface": "cmd.lvl.set",
      "Config": {
        "DefaultValue": {
          "Value": 60,
          "ValueType": "int"
        },
        "IsVariableGlobal": false,
        "Props": {},
        "RegisterAsVirtualService": false,
        "ResponseToTopic": "",
        "VariableName": "",
        "VirtualServiceGroup": "",
        "VirtualServiceProps": {}
      },
      "Ui": {
        "nodeType": "",
        "x": 49,
        "y": 1273
      },
      "TypeAlias": "Action"
    },
    {
      "Id": "18",
      "Type": "action",
      "Label": "downlights off",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "pt:j1/mt:cmd/rt:dev/rn:zw/ad:1/sv:out_lvl_switch/ad:25_0",
      "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": 344,
        "y": 1306
      },
      "TypeAlias": "Action"
    },
    {
      "Id": "19",
      "Type": "trigger",
      "Label": "walkin sensor presence",
      "SuccessTransition": "8",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "pt:j1/mt:evt/rt:dev/rn:zigbee/ad:1/sv:sensor_presence/ad:6_35",
      "Service": "sensor_presence",
      "ServiceInterface": "evt.presence.report",
      "Config": {
        "IsValueFilterEnabled": false,
        "LookupServiceNameAndLocation": false,
        "RegisterAsVirtualService": false,
        "Timeout": 0,
        "ValueFilter": {
          "Value": true,
          "ValueType": "bool"
        },
        "VirtualServiceGroup": "ch_0",
        "VirtualServiceProps": {}
      },
      "Ui": {
        "nodeType": "",
        "x": 566,
        "y": 120
      },
      "TypeAlias": "Trigger"
    }
  ],
  "Settings": null,
  "IsDisabled": false,
  "IsDefault": false,
  "ParallelExecution": "keep_last"
}

The last one was what I was looking for and I like the idea of the time constraints as well.

I had tried the standard that’s included on the site, but for some reason it would repeatedly - but unpredictably fail to keep the lights on, and then wouldn’t reactivate for a few minutes - my wife was getting frustrated. :slight_smile: This one seems to keep them on, so I’m not sure what the difference is, but I’ll have her try it “in real life” tomorrow.

Thanks!

Mike

1 Like