There are 2 options :
- Use property filter in Trigger
- Use transform node to extract unit and if to filter
Property filter is the simplest option but the property is not available in UI , however, can be added via Flow Source editor , like this :
Complete flow should look like that :
{
“Id”: “3rVmRSXD225Tmut”,
“ClassId”: “3rVmRSXD225Tmut”,
“Author”: “”,
“Version”: 0,
“CreatedAt”: “2020-06-04T11:13:05.198725564+02:00”,
“UpdatedAt”: “2020-06-04T12:23:57.899144379+02:00”,
“Name”: “Meter tester”,
“Group”: “test”,
“Description”: “”,
“Nodes”: [
{
“Id”: “1”,
“Type”: “trigger”,
“Label”: “Meter report”,
“SuccessTransition”: “2”,
“TimeoutTransition”: “”,
“ErrorTransition”: “”,
“Address”: “pt:j1/mt:evt/rt:dev/rn:tibber/ad:1/sv:meter_elec/ad:user_your_tibber_id_here”,
“Service”: “meter_elec”,
“ServiceInterface”: “evt.meter.report”,
“Config”: {
“InputVariableType”: “”,
“IsValueFilterEnabled”: false,
“LookupServiceNameAndLocation”: false,
“PropFilterName”: “unit”,
“PropFilterValue”: “W”,
“RegisterAsVirtualService”: false,
“Timeout”: 0,
“ValueFilter”: {
“Value”: null,
“ValueType”: “”
},
“ValueJPath”: “”,
“ValueJPathResultType”: “”,
“VirtualServiceGroup”: “”,
“VirtualServiceProps”: null
},
“Ui”: {
“nodeType”: “”,
“x”: 279,
“y”: 180
}
},
{
“Id”: “2”,
“Type”: “set_variable”,
“Label”: “Save last meter value”,
“SuccessTransition”: “”,
“TimeoutTransition”: “”,
“ErrorTransition”: “”,
“Address”: “”,
“Service”: “”,
“ServiceInterface”: “”,
“Config”: {
“DefaultValue”: {
“Value”: 0,
“ValueType”: “”
},
“Name”: “han_meter_power”,
“UpdateGlobal”: true,
“UpdateInputMsg”: false
},
“Ui”: {
“nodeType”: “”,
“x”: 198,
“y”: 453
}
}
],
“Settings”: null,
“IsDisabled”: false,
“IsDefault”: false,
“ParallelExecution”: “parallel”
}