Det er det den gjør ! Pris og middel oppdateres en gang i timen ! Så selv om standard HAN automasjonen leser pris hver gang , så er jo de ikke noe du trenger å gjøre .
{
"Id": "c6d39a50-602b-11ed-8d5c-8768919e1f06",
"ClassId": "c6d39a50-602b-11ed-8d5c-8768919e1f06",
"Author": "your name ",
"Version": 0,
"CreatedAt": "2022-11-09T12:41:05.397368Z",
"UpdatedAt": "2022-11-09T15:17:21.332519779+01:00",
"Name": "Strømpris",
"Group": "energy_price",
"Description": "Oppdateres på hele time ",
"Nodes": [
{
"Id": "f5bbce09-dd1d-44c0-b6a8-27a84da03a83",
"Type": "trigger",
"Label": "HAN",
"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": "average",
"TargetVariableType": "int",
"UpdateInputVariable": false
}
]
},
"Ui": {
"nodeType": "",
"papp": {
"customValues": null,
"nodeId": null,
"nodeName": "value",
"nodeType": "energy"
},
"x": 100,
"y": 400
},
"TypeAlias": "Transform"
},
{
"Id": "2",
"Type": "trigger",
"Label": "Han 2 ",
"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": 506,
"y": 361
},
"TypeAlias": "Transform"
},
{
"Id": "4",
"Type": "wait",
"Label": "Wait 1s for variable",
"SuccessTransition": "7",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": 1000,
"Ui": {
"nodeType": "",
"papp": {
"customValues": null,
"nodeId": null,
"nodeName": "wait",
"nodeType": "energy"
},
"x": 506,
"y": 550
},
"TypeAlias": "Delay"
},
{
"Id": "6",
"Type": "transform",
"Label": "",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Expression": "price*1.00",
"IsLVariableGlobal": false,
"IsRVariableGlobal": false,
"IsTargetVariableGlobal": true,
"IsTargetVariableInMemory": false,
"LVariableName": "price",
"RValue": {
"Value": 0,
"ValueType": "int"
},
"RVariableName": "",
"Rtype": "var",
"TargetVariableName": "PowerPrice",
"TargetVariableType": "float",
"Template": "",
"TransformType": "calc",
"ValueMapping": [],
"XPathMapping": []
},
"Ui": {
"nodeType": "",
"x": 495,
"y": 924
},
"TypeAlias": "Transform"
},
{
"Id": "7",
"Type": "transform",
"Label": "",
"SuccessTransition": "6",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Expression": "average*1.00",
"IsLVariableGlobal": false,
"IsRVariableGlobal": false,
"IsTargetVariableGlobal": true,
"IsTargetVariableInMemory": false,
"LVariableName": "average",
"RValue": {
"Value": 0,
"ValueType": "int"
},
"RVariableName": "",
"Rtype": "var",
"TargetVariableName": "PowerAverage",
"TargetVariableType": "float",
"Template": "",
"TransformType": "calc",
"ValueMapping": [],
"XPathMapping": []
},
"Ui": {
"nodeType": "",
"x": 501,
"y": 739
},
"TypeAlias": "Transform"
}
],
"Settings": null,
"IsDisabled": false,
"IsDefault": false,
"ParallelExecution": "keep_last"
}