Tror denne burde virke, du lager en variabel i høyre streng som du setter slik jeg har beskrevet i teksten, i IF-noden på venstre side så legger du inn den variabelen du nettopp laget i linje 2, og kriteriet “true”. Høyre side er å sette dørmagnet status, venstre side er pushvarsel. Har ingen dørmagnet i systemet lenger, så får ikke testet den, men burde fungere…
{
"Id": "dIvwOOeyL3f9RNw",
"ClassId": "dIvwOOeyL3f9RNw",
"Author": "",
"Version": 0,
"CreatedAt": "2023-04-28T21:24:25.478236306+02:00",
"UpdatedAt": "2023-04-28T21:28:17.707616957+02:00",
"Name": "Varsel ved aapen doer, Away modus",
"Group": "Pushvarsel",
"Description": "Ved Away modus blir magnetbryter inngangsdoer sjekket",
"Nodes": [
{
"Id": "1",
"Type": "vinc_trigger",
"Label": "Modus trigger",
"SuccessTransition": "2",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"EventType": "mode",
"IsValueFilterEnabled": false,
"Timeout": 0,
"ValueFilter": "away"
},
"Ui": {
"nodeType": "",
"x": 229,
"y": 169
},
"TypeAlias": "Home event"
},
{
"Id": "2",
"Type": "if",
"Label": "Trigger=away og Variabel_doermagnet=true",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Expression": [
{
"BooleanOperator": "and",
"LeftVariableIsGlobal": false,
"LeftVariableName": "",
"Operand": "eq",
"RightVariable": {
"Value": "away",
"ValueType": "string"
}
},
{
"BooleanOperator": "",
"LeftVariableIsGlobal": true,
"LeftVariableName": "fh.home.mode",
"Operand": "eq",
"RightVariable": {
"Value": true,
"ValueType": "bool"
}
}
],
"FalseTransition": "",
"TrueTransition": "3"
},
"Ui": {
"nodeType": "",
"x": 226,
"y": 337
},
"TypeAlias": "If condition"
},
{
"Id": "3",
"Type": "action",
"Label": "Pushvarsel ved aapen doer",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "pt:j1/mt:evt/rt:app/rn:kind_owl/ad:1",
"Service": "kind-owl",
"ServiceInterface": "evt.notification.report",
"Config": {
"DefaultValue": {
"Value": {
"EventName": "custom",
"MessageContent": "Inngangsdoeren er aapen",
"SiteId": "e15cb7d9-50bb-4ff5-89c2-b9f90fa875ec"
},
"ValueType": "object"
},
"IsVariableGlobal": false,
"Props": {},
"RegisterAsVirtualService": false,
"VariableName": "",
"VirtualServiceGroup": "",
"VirtualServiceProps": {}
},
"Ui": {
"nodeType": "notification_action",
"x": 220,
"y": 505
},
"TypeAlias": "Notification"
},
{
"Id": "4",
"Type": "trigger",
"Label": "Doermagnet status",
"Address": "",
"Service": "",
"ServiceInterface": "",
"SuccessTransition": "5",
"ErrorTransition": "",
"Config": {
"Timeout": 0,
"VirtualServiceGroup": "ch_0",
"VirtualServiceProps": {},
"RegisterAsVirtualService": false,
"LookupServiceNameAndLocation": false,
"ValueFilter": {
"Value": "",
"ValueType": "bool"
},
"IsValueFilterEnabled": false
},
"Ui": {
"x": 661,
"y": 188,
"nodeType": ""
},
"TypeAlias": "Trigger"
},
{
"Id": "5",
"Type": "if",
"Label": "Doermagnet aapen=true",
"Address": "",
"Service": "",
"ServiceInterface": "",
"SuccessTransition": "",
"ErrorTransition": "",
"Config": {
"TrueTransition": "6",
"FalseTransition": "7",
"Expression": [
{
"Operand": "eq",
"LeftVariableName": "",
"LeftVariableIsGlobal": false,
"RightVariable": {
"Value": true,
"ValueType": "bool"
},
"BooleanOperator": ""
}
]
},
"Ui": {
"x": 653,
"y": 354,
"nodeType": ""
},
"TypeAlias": "If condition"
},
{
"Id": "6",
"Type": "set_variable",
"Label": "Variabel doermagnet settes til true",
"Address": "",
"Service": "",
"ServiceInterface": "",
"SuccessTransition": "",
"ErrorTransition": "",
"Config": {
"Name": "",
"UpdateGlobal": false,
"UpdateInputMsg": false,
"IsVariableInMemory": true,
"DefaultValue": {
"Value": 0,
"ValueType": "string"
}
},
"Ui": {
"x": 523,
"y": 512,
"nodeType": ""
},
"TypeAlias": "Set variable"
},
{
"Id": "7",
"Type": "set_variable",
"Label": "Variabel doermagnet settes til false",
"Address": "",
"Service": "",
"ServiceInterface": "",
"SuccessTransition": "",
"ErrorTransition": "",
"Config": {
"Name": "",
"UpdateGlobal": false,
"UpdateInputMsg": false,
"IsVariableInMemory": true,
"DefaultValue": {
"Value": 0,
"ValueType": "string"
}
},
"Ui": {
"x": 764,
"y": 511,
"nodeType": ""
},
"TypeAlias": "Set variable"
}
],
"Settings": null,
"IsDisabled": false,
"IsDefault": false,
"ParallelExecution": "parallel"
}