[
{
"id": "28258fb2ba1372ba",
"type": "tab",
"label": "PV Powerfaktor Automation",
"disabled": false,
"info": "",
"env": []
},
{
"id": "9802de013b956733",
"type": "debug",
"z": "28258fb2ba1372ba",
"name": "debug 36",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1100,
"y": 200,
"wires": []
},
{
"id": "300a12c66ccf7f8c",
"type": "api-call-service",
"z": "28258fb2ba1372ba",
"name": "set Value Power Faktor",
"server": "cb7b4a3ce8c4df39",
"version": 5,
"debugenabled": false,
"domain": "number",
"service": "set_value",
"areaId": [],
"deviceId": [],
"entityId": [
"number.growatt_esphome_power_factor"
],
"data": "{\t \"value\":msg.payload\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 870,
"y": 200,
"wires": [
[]
]
},
{
"id": "c57943285edd8e1f",
"type": "api-current-state",
"z": "28258fb2ba1372ba",
"name": "get Powerfaktor",
"server": "cb7b4a3ce8c4df39",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "number.growatt_esphome_power_factor",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 500,
"y": 120,
"wires": [
[
"14d22b428357de73"
]
]
},
{
"id": "fe27b451d600f08a",
"type": "function",
"z": "28258fb2ba1372ba",
"name": "+5",
"func": "var lim = msg.payload + 5;\nvar limit = Math.ceil(lim);\nreturn [{ payload: limit }];",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 470,
"y": 200,
"wires": [
[
"53ab3fc2dd725815"
]
]
},
{
"id": "53ab3fc2dd725815",
"type": "function",
"z": "28258fb2ba1372ba",
"name": "range (min-max)",
"func": "var min = 20 ;\nvar max = 100 ;\n\nvar limit = msg.payload ;\n\nif (limit > max) {\n limit = max;\n} else if (limit < min) {\n limit = min;\n} \n\n\nreturn[{payload:limit}];",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 640,
"y": 200,
"wires": [
[
"300a12c66ccf7f8c"
]
]
},
{
"id": "14d22b428357de73",
"type": "function",
"z": "28258fb2ba1372ba",
"name": "abs",
"func": "var abs = Math.abs(msg.payload);\n\nreturn [{ payload: abs }]",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 330,
"y": 200,
"wires": [
[
"fe27b451d600f08a"
]
]
},
{
"id": "a93f6162f0195d22",
"type": "debug",
"z": "28258fb2ba1372ba",
"name": "debug 37",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1100,
"y": 420,
"wires": []
},
{
"id": "68749c9aeeda5b45",
"type": "function",
"z": "28258fb2ba1372ba",
"name": "-5",
"func": "var lim = msg.payload - 5;\nvar limit = Math.ceil(lim);\nreturn [{ payload: limit }];",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 490,
"y": 420,
"wires": [
[
"91844c9cbe01fd4f"
]
]
},
{
"id": "91844c9cbe01fd4f",
"type": "function",
"z": "28258fb2ba1372ba",
"name": "range (min-max)",
"func": "var min = 20 ;\nvar max = 100 ;\n\nvar limit = msg.payload ;\n\nif (limit > max) {\n limit = max;\n} else if (limit < min) {\n limit = min;\n} \n\n\nreturn[{payload:limit}];",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 660,
"y": 420,
"wires": [
[
"fbb6f6d5d26a80f2"
]
]
},
{
"id": "bf3ea59878b05f19",
"type": "function",
"z": "28258fb2ba1372ba",
"name": "abs",
"func": "var abs = Math.abs(msg.payload);\n\nreturn [{ payload: abs }]",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 370,
"y": 420,
"wires": [
[
"68749c9aeeda5b45"
]
]
},
{
"id": "2cb25ee2d1f03018",
"type": "api-current-state",
"z": "28258fb2ba1372ba",
"name": "get Powerfaktor",
"server": "cb7b4a3ce8c4df39",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "number.growatt_esphome_power_factor",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 500,
"y": 320,
"wires": [
[
"bf3ea59878b05f19"
]
]
},
{
"id": "fbb6f6d5d26a80f2",
"type": "api-call-service",
"z": "28258fb2ba1372ba",
"name": "set Value Power Faktor",
"server": "cb7b4a3ce8c4df39",
"version": 5,
"debugenabled": false,
"domain": "number",
"service": "set_value",
"areaId": [],
"deviceId": [],
"entityId": [
"number.growatt_esphome_power_factor"
],
"data": "{\t \"value\":msg.payload\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 890,
"y": 420,
"wires": [
[]
]
},
{
"id": "d8d6938d190d8eee",
"type": "trigger-state",
"z": "28258fb2ba1372ba",
"name": "Shelly EM < -100W",
"server": "cb7b4a3ce8c4df39",
"version": 4,
"inputs": 0,
"outputs": 2,
"exposeAsEntityConfig": "",
"entityId": "sensor.shelly_em_channel_1_power",
"entityIdType": "exact",
"debugEnabled": false,
"constraints": [
{
"targetType": "this_entity",
"targetValue": "",
"propertyType": "current_state",
"propertyValue": "new_state.state",
"comparatorType": ">",
"comparatorValueDatatype": "str",
"comparatorValue": "-900"
},
{
"targetType": "this_entity",
"targetValue": "",
"propertyType": "current_state",
"propertyValue": "new_state.state",
"comparatorType": "<",
"comparatorValueDatatype": "str",
"comparatorValue": "-100"
}
],
"customOutputs": [],
"outputInitially": false,
"stateType": "num",
"enableInput": false,
"x": 110,
"y": 320,
"wires": [
[
"46bf2778243cae66"
],
[]
]
},
{
"id": "70229a2257d6868b",
"type": "trigger-state",
"z": "28258fb2ba1372ba",
"name": "Shelly EM > 0W",
"server": "cb7b4a3ce8c4df39",
"version": 4,
"inputs": 0,
"outputs": 2,
"exposeAsEntityConfig": "",
"entityId": "sensor.shelly_em_channel_1_power",
"entityIdType": "exact",
"debugEnabled": false,
"constraints": [
{
"targetType": "this_entity",
"targetValue": "",
"propertyType": "current_state",
"propertyValue": "new_state.state",
"comparatorType": ">",
"comparatorValueDatatype": "str",
"comparatorValue": "-10"
}
],
"customOutputs": [],
"outputInitially": false,
"stateType": "num",
"enableInput": false,
"x": 100,
"y": 120,
"wires": [
[
"fb294bde8c0e4b90"
],
[]
]
},
{
"id": "46bf2778243cae66",
"type": "api-current-state",
"z": "28258fb2ba1372ba",
"name": "PV Schalter",
"server": "cb7b4a3ce8c4df39",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.pv_automation",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 310,
"y": 320,
"wires": [
[
"2cb25ee2d1f03018"
],
[]
]
},
{
"id": "fb294bde8c0e4b90",
"type": "api-current-state",
"z": "28258fb2ba1372ba",
"name": "PV Schalter",
"server": "cb7b4a3ce8c4df39",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.pv_automation",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 310,
"y": 120,
"wires": [
[
"c57943285edd8e1f"
],
[]
]
},
{
"id": "a1618e66df583208",
"type": "comment",
"z": "28258fb2ba1372ba",
"name": "PV Powerfaktor Automation",
"info": "",
"x": 140,
"y": 60,
"wires": []
},
{
"id": "cb7b4a3ce8c4df39",
"type": "server",
"name": "Home Assistant PVE",
"version": 5,
"addon": false,
"rejectUnauthorizedCerts": false,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true,
"heartbeat": false,
"heartbeatInterval": "30",
"areaSelector": "friendlyName",
"deviceSelector": "friendlyName",
"entitySelector": "friendlyName",
"statusSeparator": ": ",
"statusYear": "hidden",
"statusMonth": "short",
"statusDay": "numeric",
"statusHourCycle": "default",
"statusTimeFormat": "h:m",
"enableGlobalContextStore": false
}
]