Lagre strømpriser i globale variabler for bruk i andre flows

Hei, Jeg prøver å lagre prisene i globale variabler, men får ikke helt til dette med kalkulasjonen av differansen på pris og gjenomsnittspris.
Pris og gjennomsnittspris blir lagret i de globale variablene, men prisforskjell variablen viser bare 0. Noen kloke hoder som ser hva jeg gjør galt :stuck_out_tongue: ? (Jeg tok utgangspunk i flow laget i appen, ser der at pris og gjennomsnittpris er lagret som int variabler, mens kalkulasjonen er float, uten at jeg helt vet hva forskjellen på de forskjellige typene en kan velge der er ?)

{
  "Id": "630c3d70-fd6a-11ec-950b-9bebc270688b",
  "ClassId": "630c3d70-fd6a-11ec-950b-9bebc270688b",
  "Author": "Tommy",
  "Version": 0,
  "CreatedAt": "2022-07-06T20:29:51.17505Z",
  "UpdatedAt": "2022-07-06T22:35:32.985522515+02:00",
  "Name": "strømprisen er 1.0% lavere enn gjennomsnittet og modusen er home, away eller sleep",
  "Group": "custom",
  "Description": " ",
  "Nodes": [
    {
      "Id": "4",
      "Type": "trigger",
      "Label": "strømprisen er 1.0% lavere enn gjennomsnittet",
      "SuccessTransition": "5",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "pt:j1/mt:evt/rt:app/rn:energy_guard/ad:1",
      "Service": "energy_price",
      "ServiceInterface": "evt.energy_price.report",
      "Config": {
        "InputVariableType": null,
        "IsValueFilterEnabled": false,
        "LookupServiceNameAndLocation": false,
        "PropFilterName": "",
        "PropFilterValue": "",
        "RegisterAsVirtualService": false,
        "Timeout": 0,
        "ValueFilter": {
          "Value": null,
          "ValueType": null
        },
        "ValueJPath": null,
        "ValueJPathResultType": null,
        "VirtualServiceGroup": "",
        "VirtualServiceProps": {}
      },
      "Ui": {
        "nodeType": "",
        "papp": {
          "customValues": null,
          "nodeId": null,
          "nodeName": "energy",
          "nodeType": "energy"
        },
        "x": 134,
        "y": 246
      },
      "TypeAlias": "Trigger"
    },
    {
      "Id": "5",
      "Type": "transform",
      "Label": "get average",
      "SuccessTransition": "6",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": "",
        "IsLVariableGlobal": false,
        "IsRVariableGlobal": false,
        "IsTargetVariableGlobal": false,
        "IsTargetVariableInMemory": false,
        "LVariableName": "",
        "RValue": {
          "Value": 0,
          "ValueType": "int"
        },
        "RVariableName": "",
        "Rtype": "var",
        "TargetVariableName": "",
        "TargetVariableType": "",
        "Template": "",
        "TransformType": "jpath",
        "ValueMapping": [],
        "XPathMapping": [
          {
            "IsTargetVariableGlobal": true,
            "Path": "$.average",
            "TargetVariableName": "Prissnitt",
            "TargetVariableType": "int",
            "UpdateInputVariable": false
          }
        ]
      },
      "Ui": {
        "nodeType": "",
        "papp": {
          "customValues": null,
          "nodeId": "1",
          "nodeName": "value",
          "nodeType": "energy"
        },
        "x": 145,
        "y": 442
      },
      "TypeAlias": "Transform"
    },
    {
      "Id": "6",
      "Type": "trigger",
      "Label": "",
      "SuccessTransition": "7",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "pt:j1/mt:evt/rt:app/rn:energy_guard/ad:1",
      "Service": "energy_price",
      "ServiceInterface": "evt.energy_price.report",
      "Config": {
        "InputVariableType": null,
        "IsValueFilterEnabled": false,
        "LookupServiceNameAndLocation": false,
        "PropFilterName": "",
        "PropFilterValue": "",
        "RegisterAsVirtualService": false,
        "Timeout": 0,
        "ValueFilter": {
          "Value": null,
          "ValueType": null
        },
        "ValueJPath": null,
        "ValueJPathResultType": null,
        "VirtualServiceGroup": "",
        "VirtualServiceProps": {}
      },
      "Ui": {
        "nodeType": "",
        "papp": {
          "customValues": null,
          "nodeId": "2",
          "nodeName": "energy",
          "nodeType": "energy"
        },
        "x": 636,
        "y": 509
      },
      "TypeAlias": "Trigger"
    },
    {
      "Id": "7",
      "Type": "transform",
      "Label": "get price",
      "SuccessTransition": "8",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": "",
        "IsLVariableGlobal": false,
        "IsRVariableGlobal": false,
        "IsTargetVariableGlobal": false,
        "IsTargetVariableInMemory": false,
        "LVariableName": "",
        "RValue": {
          "Value": 0,
          "ValueType": "int"
        },
        "RVariableName": "",
        "Rtype": "var",
        "TargetVariableName": "",
        "TargetVariableType": "",
        "Template": "",
        "TransformType": "jpath",
        "ValueMapping": [],
        "XPathMapping": [
          {
            "IsTargetVariableGlobal": true,
            "Path": "$.price",
            "TargetVariableName": "Pris",
            "TargetVariableType": "int",
            "UpdateInputVariable": false
          }
        ]
      },
      "Ui": {
        "nodeType": "",
        "papp": {
          "customValues": null,
          "nodeId": "3",
          "nodeName": "value",
          "nodeType": "energy"
        },
        "x": 1032,
        "y": 451
      },
      "TypeAlias": "Transform"
    },
    {
      "Id": "8",
      "Type": "wait",
      "Label": "Wait 1s for variable",
      "SuccessTransition": "9",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": 1000,
      "Ui": {
        "nodeType": "",
        "papp": {
          "customValues": null,
          "nodeId": "4",
          "nodeName": "wait",
          "nodeType": "energy"
        },
        "x": 1348,
        "y": 409
      },
      "TypeAlias": "Delay"
    },
    {
      "Id": "9",
      "Type": "transform",
      "Label": "price - (average * 0.9)",
      "SuccessTransition": "10",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": "Pris - (Prissnitt * 0.99)",
        "IsLVariableGlobal": false,
        "IsRVariableGlobal": false,
        "IsTargetVariableGlobal": true,
        "IsTargetVariableInMemory": false,
        "LVariableName": "average",
        "RValue": {
          "Value": 0,
          "ValueType": "float"
        },
        "RVariableName": "",
        "Rtype": "var",
        "TargetVariableName": "Prisforskjell",
        "TargetVariableType": "float",
        "Template": "",
        "TransformType": "calc",
        "ValueMapping": [],
        "XPathMapping": []
      },
      "Ui": {
        "nodeType": "",
        "papp": {
          "customValues": {
            "node_type": "transform_calc",
            "threshold": 0.01
          },
          "nodeId": "",
          "nodeName": "value",
          "nodeType": "energy"
        },
        "x": 1407,
        "y": 622
      },
      "TypeAlias": "Transform"
    },
    {
      "Id": "10",
      "Type": "if",
      "Label": "difference lt 0",
      "SuccessTransition": "11",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": [
          {
            "BooleanOperator": "",
            "LeftVariableIsGlobal": false,
            "LeftVariableName": "difference",
            "Operand": "lt",
            "RightVariable": {
              "Value": 0,
              "ValueType": "float"
            }
          }
        ],
        "FalseTransition": "",
        "TrueTransition": "11"
      },
      "Ui": {
        "nodeType": "",
        "papp": {
          "customValues": {
            "node_type": "if_diff"
          },
          "nodeId": "",
          "nodeName": "If",
          "nodeType": "If"
        },
        "x": 1779,
        "y": 328
      },
      "TypeAlias": "If condition"
    },
    {
      "Id": "11",
      "Type": "if",
      "Label": "og modusen er home, away eller sleep",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "tpflow",
      "ServiceInterface": "",
      "Config": {
        "Expression": [
          {
            "BooleanOperator": "or",
            "LeftVariableIsGlobal": true,
            "LeftVariableName": "fh.home.mode",
            "Operand": "eq",
            "RightVariable": {
              "Value": "home",
              "ValueType": "string"
            }
          },
          {
            "BooleanOperator": "or",
            "LeftVariableIsGlobal": true,
            "LeftVariableName": "fh.home.mode",
            "Operand": "eq",
            "RightVariable": {
              "Value": "away",
              "ValueType": "string"
            }
          },
          {
            "BooleanOperator": "or",
            "LeftVariableIsGlobal": true,
            "LeftVariableName": "fh.home.mode",
            "Operand": "eq",
            "RightVariable": {
              "Value": "sleep",
              "ValueType": "string"
            }
          }
        ],
        "FalseTransition": "",
        "TrueTransition": ""
      },
      "Ui": {
        "nodeType": "",
        "papp": {
          "customValues": null,
          "nodeId": "home,away,sleep",
          "nodeName": "If",
          "nodeType": "modeTrigger"
        },
        "x": 1745,
        "y": 517
      },
      "TypeAlias": "If condition"
    },
    {
      "Id": "12",
      "Type": "vinc_trigger",
      "Label": "Home event trigger",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "SuccessTransition": "8",
      "ErrorTransition": "",
      "Config": {
        "Timeout": 0,
        "ValueFilter": "18",
        "IsValueFilterEnabled": true,
        "EventType": "shortcut"
      },
      "Ui": {
        "x": 699,
        "y": 191,
        "nodeType": ""
      },
      "TypeAlias": "Home event"
    }
  ],
  "Settings": null,
  "IsDisabled": false,
  "IsDefault": false,
  "ParallelExecution": "parallel"
}
1 Like

hei, prøver på det samme og skulle gjerne hatt noen kloke hoder til å se på dette.

{
  "Id": "0be16e30-59d6-11ed-8b3b-bf3bab1e877b",
  "ClassId": "0be16e30-59d6-11ed-8b3b-bf3bab1e877b",
  "Author": "joakim@rusvik.no",
  "Version": 0,
  "CreatedAt": "2022-11-01T11:12:17.556027Z",
  "UpdatedAt": "2022-11-01T14:19:51.615315335+01:00",
  "Name": "4 delt strømpris",
  "Group": "global",
  "Description": "setter globale strømpris variabler",
  "Nodes": [
    {
      "Id": "6f1c1d35-91ef-45ad-a2b1-edeec3f2ac40",
      "Type": "trigger",
      "Label": "energy price is 1% higher than daily average",
      "SuccessTransition": "1",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "pt:j1/mt:evt/rt:app/rn:energy_guard/ad:1",
      "Service": "energy_price",
      "ServiceInterface": "evt.energy_price.report",
      "Config": {
        "InputVariableType": null,
        "IsValueFilterEnabled": false,
        "LookupServiceNameAndLocation": false,
        "PropFilterName": "",
        "PropFilterValue": "",
        "RegisterAsVirtualService": false,
        "Timeout": 0,
        "ValueFilter": {
          "Value": null,
          "ValueType": null
        },
        "ValueJPath": null,
        "ValueJPathResultType": null,
        "VirtualServiceGroup": "",
        "VirtualServiceProps": {}
      },
      "Ui": {
        "nodeType": "",
        "papp": {
          "customValues": null,
          "nodeId": null,
          "nodeName": "energy",
          "nodeType": "energy"
        },
        "x": 100,
        "y": 200
      },
      "TypeAlias": "Trigger"
    },
    {
      "Id": "1",
      "Type": "transform",
      "Label": "get average",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": "",
        "IsLVariableGlobal": false,
        "IsRVariableGlobal": false,
        "IsTargetVariableGlobal": false,
        "IsTargetVariableInMemory": false,
        "LVariableName": "",
        "RValue": {
          "Value": 0,
          "ValueType": "int"
        },
        "RVariableName": "",
        "Rtype": "var",
        "TargetVariableName": "",
        "TargetVariableType": "",
        "Template": "",
        "TransformType": "jpath",
        "ValueMapping": [],
        "XPathMapping": [
          {
            "Path": "$.average",
            "TargetVariableName": "",
            "UpdateInputVariable": false
          }
        ]
      },
      "Ui": {
        "nodeType": "",
        "papp": {
          "customValues": null,
          "nodeId": null,
          "nodeName": "value",
          "nodeType": "energy"
        },
        "x": 100,
        "y": 400
      },
      "TypeAlias": "Transform"
    },
    {
      "Id": "2",
      "Type": "trigger",
      "Label": "",
      "SuccessTransition": "3",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "pt:j1/mt:evt/rt:app/rn:energy_guard/ad:1",
      "Service": "energy_price",
      "ServiceInterface": "evt.energy_price.report",
      "Config": {
        "InputVariableType": null,
        "IsValueFilterEnabled": false,
        "LookupServiceNameAndLocation": false,
        "PropFilterName": "",
        "PropFilterValue": "",
        "RegisterAsVirtualService": false,
        "Timeout": 0,
        "ValueFilter": {
          "Value": null,
          "ValueType": null
        },
        "ValueJPath": null,
        "ValueJPathResultType": null,
        "VirtualServiceGroup": "",
        "VirtualServiceProps": {}
      },
      "Ui": {
        "nodeType": "",
        "papp": {
          "customValues": null,
          "nodeId": null,
          "nodeName": "energy",
          "nodeType": "energy"
        },
        "x": 500,
        "y": 200
      },
      "TypeAlias": "Trigger"
    },
    {
      "Id": "3",
      "Type": "transform",
      "Label": "get price",
      "SuccessTransition": "4",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": "",
        "IsLVariableGlobal": false,
        "IsRVariableGlobal": false,
        "IsTargetVariableGlobal": false,
        "IsTargetVariableInMemory": false,
        "LVariableName": "",
        "RValue": {
          "Value": 0,
          "ValueType": "int"
        },
        "RVariableName": "",
        "Rtype": "var",
        "TargetVariableName": "",
        "TargetVariableType": "",
        "Template": "",
        "TransformType": "jpath",
        "ValueMapping": [],
        "XPathMapping": [
          {
            "Path": "$.price",
            "TargetVariableName": "price",
            "TargetVariableType": "int",
            "UpdateInputVariable": false
          }
        ]
      },
      "Ui": {
        "nodeType": "",
        "papp": {
          "customValues": null,
          "nodeId": null,
          "nodeName": "value",
          "nodeType": "energy"
        },
        "x": 500,
        "y": 400
      },
      "TypeAlias": "Transform"
    },
    {
      "Id": "4",
      "Type": "wait",
      "Label": "Wait 1s for variable",
      "SuccessTransition": "5",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": 1000,
      "Ui": {
        "nodeType": "",
        "papp": {
          "customValues": null,
          "nodeId": null,
          "nodeName": "wait",
          "nodeType": "energy"
        },
        "x": 500,
        "y": 700
      },
      "TypeAlias": "Delay"
    },
    {
      "Id": "5",
      "Type": "transform",
      "Label": "price - (average * 2.0)",
      "SuccessTransition": "6",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": "price - (average * 2.0)",
        "IsLVariableGlobal": false,
        "IsRVariableGlobal": false,
        "IsTargetVariableGlobal": false,
        "IsTargetVariableInMemory": false,
        "LVariableName": "average",
        "RValue": {
          "Value": 0,
          "ValueType": "float"
        },
        "RVariableName": "",
        "Rtype": "var",
        "TargetVariableName": "difference",
        "TargetVariableType": "float",
        "Template": "",
        "TransformType": "calc",
        "ValueMapping": [],
        "XPathMapping": []
      },
      "Ui": {
        "nodeType": "",
        "papp": {
          "customValues": {
            "flow_part": "main",
            "node_type": "transform_calc",
            "threshold": 0.01
          },
          "nodeId": null,
          "nodeName": "value",
          "nodeType": "energy"
        },
        "x": 501,
        "y": 885
      },
      "TypeAlias": "Transform"
    },
    {
      "Id": "6",
      "Type": "if",
      "Label": "difference gt 0",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": [
          {
            "BooleanOperator": "",
            "LeftVariableName": "",
            "Operand": "gt",
            "RightVariable": {
              "Value": 0,
              "ValueType": "float"
            }
          }
        ],
        "FalseTransition": "9",
        "TrueTransition": "12"
      },
      "Ui": {
        "nodeType": "",
        "papp": {
          "customValues": {
            "flow_part": "main",
            "node_type": "if_diff"
          },
          "nodeId": null,
          "nodeName": "If",
          "nodeType": "If"
        },
        "x": 500,
        "y": 1100
      },
      "TypeAlias": "If condition"
    },
    {
      "Id": "8",
      "Type": "transform",
      "Label": "price - (average * 0.5)",
      "SuccessTransition": "11",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": "price - (average * 0.5)",
        "IsLVariableGlobal": false,
        "IsRVariableGlobal": false,
        "IsTargetVariableGlobal": false,
        "IsTargetVariableInMemory": false,
        "LVariableName": "average",
        "RValue": {
          "Value": 0,
          "ValueType": "float"
        },
        "RVariableName": "",
        "Rtype": "var",
        "TargetVariableName": "difference",
        "TargetVariableType": "float",
        "Template": "",
        "TransformType": "calc",
        "ValueMapping": [],
        "XPathMapping": []
      },
      "Ui": {
        "nodeType": "",
        "papp": {
          "customValues": {
            "flow_part": "main",
            "node_type": "transform_calc",
            "threshold": 0.01
          },
          "nodeId": null,
          "nodeName": "value",
          "nodeType": "energy"
        },
        "x": 1017,
        "y": 906
      },
      "TypeAlias": "Transform"
    },
    {
      "Id": "9",
      "Type": "transform",
      "Label": "price - (average * 1.5)",
      "SuccessTransition": "10",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": "price - (average * 1.5)",
        "IsLVariableGlobal": false,
        "IsRVariableGlobal": false,
        "IsTargetVariableGlobal": false,
        "IsTargetVariableInMemory": false,
        "LVariableName": "average",
        "RValue": {
          "Value": 0,
          "ValueType": "float"
        },
        "RVariableName": "",
        "Rtype": "var",
        "TargetVariableName": "difference",
        "TargetVariableType": "float",
        "Template": "",
        "TransformType": "calc",
        "ValueMapping": [],
        "XPathMapping": []
      },
      "Ui": {
        "nodeType": "",
        "papp": {
          "customValues": {
            "flow_part": "main",
            "node_type": "transform_calc",
            "threshold": 0.01
          },
          "nodeId": null,
          "nodeName": "value",
          "nodeType": "energy"
        },
        "x": 745,
        "y": 894
      },
      "TypeAlias": "Transform"
    },
    {
      "Id": "10",
      "Type": "if",
      "Label": "difference gt 0",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": [
          {
            "BooleanOperator": "",
            "LeftVariableName": "",
            "Operand": "gt",
            "RightVariable": {
              "Value": 0,
              "ValueType": "float"
            }
          }
        ],
        "FalseTransition": "8",
        "TrueTransition": "15"
      },
      "Ui": {
        "nodeType": "",
        "papp": {
          "customValues": {
            "flow_part": "main",
            "node_type": "if_diff"
          },
          "nodeId": null,
          "nodeName": "If",
          "nodeType": "If"
        },
        "x": 785,
        "y": 1088
      },
      "TypeAlias": "If condition"
    },
    {
      "Id": "11",
      "Type": "if",
      "Label": "difference gt 0",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": [
          {
            "BooleanOperator": "",
            "LeftVariableIsGlobal": false,
            "LeftVariableName": "difference",
            "Operand": "gt",
            "RightVariable": {
              "Value": 0,
              "ValueType": "float"
            }
          }
        ],
        "FalseTransition": "14",
        "TrueTransition": "13"
      },
      "Ui": {
        "nodeType": "",
        "papp": {
          "customValues": {
            "flow_part": "main",
            "node_type": "if_diff"
          },
          "nodeId": null,
          "nodeName": "If",
          "nodeType": "If"
        },
        "x": 1051,
        "y": 1106
      },
      "TypeAlias": "If condition"
    },
    {
      "Id": "12",
      "Type": "set_variable",
      "Label": "strømpris peak",
      "SuccessTransition": "18",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "DefaultValue": {
          "Value": "4",
          "ValueType": "float"
        },
        "IsVariableInMemory": true,
        "Name": "strømpris",
        "UpdateGlobal": true,
        "UpdateInputMsg": false
      },
      "Ui": {
        "nodeType": "",
        "x": 485,
        "y": 1297
      },
      "TypeAlias": "Set variable"
    },
    {
      "Id": "13",
      "Type": "set_variable",
      "Label": "strømpris billig",
      "SuccessTransition": "19",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "DefaultValue": {
          "Value": "1",
          "ValueType": "float"
        },
        "IsVariableInMemory": true,
        "Name": "strømpris",
        "UpdateGlobal": true,
        "UpdateInputMsg": false
      },
      "Ui": {
        "nodeType": "",
        "x": 1308,
        "y": 1297
      },
      "TypeAlias": "Set variable"
    },
    {
      "Id": "14",
      "Type": "set_variable",
      "Label": "strømpris normal",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "DefaultValue": {
          "Value": "2",
          "ValueType": "float"
        },
        "IsVariableInMemory": true,
        "Name": "strømpris",
        "UpdateGlobal": true,
        "UpdateInputMsg": false
      },
      "Ui": {
        "nodeType": "",
        "x": 1056,
        "y": 1290
      },
      "TypeAlias": "Set variable"
    },
    {
      "Id": "15",
      "Type": "set_variable",
      "Label": "strømpris høy",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "DefaultValue": {
          "Value": "3",
          "ValueType": "float"
        },
        "IsVariableInMemory": true,
        "Name": "strømpris",
        "UpdateGlobal": true,
        "UpdateInputMsg": false
      },
      "Ui": {
        "nodeType": "",
        "x": 768,
        "y": 1305
      },
      "TypeAlias": "Set variable"
    },
    {
      "Id": "18",
      "Type": "action",
      "Label": "Push notification høy strømpris",
      "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": "høy strømpris",
            "SiteId": ""
          },
          "ValueType": "object"
        },
        "IsVariableGlobal": false,
        "Props": {},
        "RegisterAsVirtualService": false,
        "VariableName": "",
        "VirtualServiceGroup": "",
        "VirtualServiceProps": {}
      },
      "Ui": {
        "nodeType": "notification_action",
        "x": 475,
        "y": 1484
      },
      "TypeAlias": "Notification"
    },
    {
      "Id": "19",
      "Type": "action",
      "Label": "Push notification billig strømpris",
      "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": "billig strømpris",
            "SiteId": ""
          },
          "ValueType": "object"
        },
        "IsVariableGlobal": false,
        "Props": {},
        "RegisterAsVirtualService": false,
        "VariableName": "",
        "VirtualServiceGroup": "",
        "VirtualServiceProps": {}
      },
      "Ui": {
        "nodeType": "notification_action",
        "x": 1330,
        "y": 1478
      },
      "TypeAlias": "Notification"
    }
  ],
  "Settings": null,
  "IsDisabled": false,
  "IsDefault": false,
  "ParallelExecution": "keep_last"
}
1 Like

Hei :slight_smile:

Hva er det som ikke virker med denne?

Har du laget en variabel som heter strømpris?
Har du prøvd med en variabel som ikke innehar spesialtegn (F.eks: strompris)
Jeg ville ikke hatt variablen “in memory” Da kan huben slite med å vite hva den skal gjør om du har automasjoner som kjører basert på prisen (Det vil si: Om huben restarter så blir det ikke laget en ny variabel før klokken blir hel (f.eks: 15:00).

Variablen skal være global, men det ser det ut som du har satt :slight_smile:

hei :slight_smile:

takk for svar

jeg har laget en variabel med float, den er ikke lenger in memory og endret den til “strompris”.

får fortsatt ikke inn noen verdi…

strever med samme sak . Kan det være at typecast ikke virker ?

x(float) = y (int) burde virke , men det kan være at typecast ikke virker men returnerer “0” .
Prøver nå med x(float) = y (int) *1.00 for å se om det går .
Om det ikke virker får jeg definere x som int…

Seig materie å feilsøke , siden tar en time mellom hver…

1 Like

det var typecast
x(float) = y (int) gir x lik 0
x(float) = y (int) *1.00 gir x lik y men som float.

1 Like

hei, og takk for at jeg får låne ditt kloke hode.

du legger det inn i transform noden? ganger du da hele formelen med 1?
har du et skjermbilde som eksempel

på forhånd takk