Here is the JSON (2/2):
{
"id": "4cc3b69b.7526f8",
"type": "cronplus",
"z": "7086a8e4.16a8f8",
"name": "Fist day of the month",
"outputField": "payload",
"timeZone": "",
"persistDynamic": false,
"commandResponseMsgOutput": "output1",
"outputs": 1,
"options": [
{
"name": "schedule1",
"topic": "schedule1",
"payloadType": "default",
"payload": "",
"expressionType": "cron",
"expression": "0 0 0 1 * *",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
}
],
"x": 140,
"y": 600,
"wires": [
[
"216f5425.723abc"
]
]
},
{
"id": "216f5425.723abc",
"type": "change",
"z": "7086a8e4.16a8f8",
"name": "Reset",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "reset",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 410,
"y": 600,
"wires": [
[
"edbc7e86.9fe3e",
"9e7424d.ade43d8"
]
]
},
{
"id": "4208a0b4.cc73c",
"type": "cronplus",
"z": "7086a8e4.16a8f8",
"name": "First day of the year",
"outputField": "payload",
"timeZone": "",
"persistDynamic": false,
"commandResponseMsgOutput": "output1",
"outputs": 1,
"options": [
{
"name": "schedule1",
"topic": "schedule1",
"payloadType": "default",
"payload": "",
"expressionType": "cron",
"expression": "0 0 0 1 1 *",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
}
],
"x": 140,
"y": 540,
"wires": [
[
"f7354d18.c2f7f"
]
]
},
{
"id": "f7354d18.c2f7f",
"type": "change",
"z": "7086a8e4.16a8f8",
"name": "Reset",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "reset",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 410,
"y": 540,
"wires": [
[
"175967a4.618ae8",
"11b95515.178cdb"
]
]
},
{
"id": "b6fcc1f6.f2961",
"type": "persist in",
"z": "7086a8e4.16a8f8",
"name": "Total Energy V",
"storageNode": "f69cfabd.8fa068",
"x": 1420,
"y": 80,
"wires": []
},
{
"id": "fc91bc80.4e93e",
"type": "persist in",
"z": "7086a8e4.16a8f8",
"name": "Year Energy V",
"storageNode": "f69cfabd.8fa068",
"x": 1420,
"y": 140,
"wires": []
},
{
"id": "b540468f.dac058",
"type": "persist in",
"z": "7086a8e4.16a8f8",
"name": "Month Energy V",
"storageNode": "f69cfabd.8fa068",
"x": 1420,
"y": 200,
"wires": []
},
{
"id": "4a807607.58d118",
"type": "persist in",
"z": "7086a8e4.16a8f8",
"name": "Day Energy V",
"storageNode": "f69cfabd.8fa068",
"x": 1420,
"y": 260,
"wires": []
},
{
"id": "6b150f6e.0fe9",
"type": "inject",
"z": "7086a8e4.16a8f8",
"name": "At startup",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": "5",
"topic": "",
"payload": "",
"payloadType": "date",
"x": 90,
"y": 160,
"wires": [
[
"e040e281.37a63",
"e9eefd7b.fc2cb",
"3719be70.5fee12",
"87047654.a617f8"
]
]
},
{
"id": "e040e281.37a63",
"type": "persist out",
"z": "7086a8e4.16a8f8",
"name": "Total Energy V",
"storageNode": "f69cfabd.8fa068",
"x": 500,
"y": 80,
"wires": [
[
"1f8d67ce.e2f8a8"
]
]
},
{
"id": "e9eefd7b.fc2cb",
"type": "persist out",
"z": "7086a8e4.16a8f8",
"name": "Year Energy V",
"storageNode": "f69cfabd.8fa068",
"x": 500,
"y": 140,
"wires": [
[
"175967a4.618ae8"
]
]
},
{
"id": "3719be70.5fee12",
"type": "persist out",
"z": "7086a8e4.16a8f8",
"name": "Month Energy V",
"storageNode": "f69cfabd.8fa068",
"x": 500,
"y": 200,
"wires": [
[
"edbc7e86.9fe3e"
]
]
},
{
"id": "87047654.a617f8",
"type": "persist out",
"z": "7086a8e4.16a8f8",
"name": "Day Energy V",
"storageNode": "f69cfabd.8fa068",
"x": 500,
"y": 260,
"wires": [
[
"f8bedfbd.a3da3"
]
]
},
{
"id": "ac43efcf.7fb26",
"type": "change",
"z": "7086a8e4.16a8f8",
"name": "total",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.total",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1250,
"y": 80,
"wires": [
[
"b6fcc1f6.f2961"
]
]
},
{
"id": "7c1ec256.b96f8c",
"type": "change",
"z": "7086a8e4.16a8f8",
"name": "total",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.total",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1250,
"y": 140,
"wires": [
[
"fc91bc80.4e93e"
]
]
},
{
"id": "4fd3648.16da69c",
"type": "change",
"z": "7086a8e4.16a8f8",
"name": "total",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.total",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1250,
"y": 200,
"wires": [
[
"b540468f.dac058"
]
]
},
{
"id": "6ce61a28.9ebe74",
"type": "change",
"z": "7086a8e4.16a8f8",
"name": "total",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.total",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1250,
"y": 260,
"wires": [
[
"4a807607.58d118"
]
]
},
{
"id": "11b95515.178cdb",
"type": "totaliser",
"z": "7086a8e4.16a8f8",
"output": "total",
"interval": "5",
"intervalUnits": "seconds",
"name": "Year Energy FV",
"x": 820,
"y": 820,
"wires": [
[
"3dd634c7.d98c1c"
]
]
},
{
"id": "9e7424d.ade43d8",
"type": "totaliser",
"z": "7086a8e4.16a8f8",
"output": "total",
"interval": "5",
"intervalUnits": "seconds",
"name": "Month Energy FV",
"x": 830,
"y": 880,
"wires": [
[
"cfb6754b.e581d8"
]
]
},
{
"id": "57bae8a0.722ce8",
"type": "totaliser",
"z": "7086a8e4.16a8f8",
"output": "total",
"interval": "5",
"intervalUnits": "seconds",
"name": "Day Energy FV",
"x": 820,
"y": 940,
"wires": [
[
"899578f8.60eb78"
]
]
},
{
"id": "3dd634c7.d98c1c",
"type": "ha-entity",
"z": "7086a8e4.16a8f8",
"name": "Net_Metering_Yearly_FV",
"server": "56157d96.6354e4",
"version": 1,
"debugenabled": false,
"outputs": 1,
"entityType": "sensor",
"config": [
{
"property": "name",
"value": "net_metering_yearly_fv"
},
{
"property": "device_class",
"value": "energy"
},
{
"property": "icon",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "kWh"
}
],
"state": "payload.total",
"stateType": "msg",
"attributes": [],
"resend": true,
"outputLocation": "",
"outputLocationType": "none",
"inputOverride": "allow",
"outputOnStateChange": false,
"outputPayload": "$entity().state ? \"on\": \"off\"",
"outputPayloadType": "jsonata",
"x": 1050,
"y": 820,
"wires": [
[
"e70c873c.784458"
]
]
},
{
"id": "cfb6754b.e581d8",
"type": "ha-entity",
"z": "7086a8e4.16a8f8",
"name": "Net_Metering_Monthly_FV",
"server": "56157d96.6354e4",
"version": 1,
"debugenabled": false,
"outputs": 1,
"entityType": "sensor",
"config": [
{
"property": "name",
"value": "net_metering_monthly_fv"
},
{
"property": "device_class",
"value": "energy"
},
{
"property": "icon",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "kWh"
}
],
"state": "payload.total",
"stateType": "msg",
"attributes": [],
"resend": true,
"outputLocation": "",
"outputLocationType": "none",
"inputOverride": "allow",
"outputOnStateChange": false,
"outputPayload": "$entity().state ? \"on\": \"off\"",
"outputPayloadType": "jsonata",
"x": 1060,
"y": 880,
"wires": [
[
"a0705be0.0496f8"
]
]
},
{
"id": "899578f8.60eb78",
"type": "ha-entity",
"z": "7086a8e4.16a8f8",
"name": "Net_Metering_Daily_FV",
"server": "56157d96.6354e4",
"version": 1,
"debugenabled": false,
"outputs": 1,
"entityType": "sensor",
"config": [
{
"property": "name",
"value": "net_metering_daily_fv"
},
{
"property": "device_class",
"value": "energy"
},
{
"property": "icon",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "kWh"
}
],
"state": "payload.total",
"stateType": "msg",
"attributes": [],
"resend": true,
"outputLocation": "",
"outputLocationType": "none",
"inputOverride": "allow",
"outputOnStateChange": false,
"outputPayload": "$entity().state ? \"on\": \"off\"",
"outputPayloadType": "jsonata",
"x": 1050,
"y": 940,
"wires": [
[
"1fc542b2.53b63d"
]
]
},
{
"id": "5256be29.98ca8",
"type": "totaliser",
"z": "7086a8e4.16a8f8",
"output": "total",
"interval": "5",
"intervalUnits": "seconds",
"name": "Total Energy FV",
"x": 820,
"y": 760,
"wires": [
[
"8ba166a1.39f9a8"
]
]
},
{
"id": "8ba166a1.39f9a8",
"type": "ha-entity",
"z": "7086a8e4.16a8f8",
"name": "Net_Metering_Total_FV",
"server": "56157d96.6354e4",
"version": 1,
"debugenabled": false,
"outputs": 1,
"entityType": "sensor",
"config": [
{
"property": "name",
"value": "net_metering_total_fv"
},
{
"property": "device_class",
"value": "energy"
},
{
"property": "icon",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "kWh"
}
],
"state": "payload.total",
"stateType": "msg",
"attributes": [],
"resend": true,
"outputLocation": "",
"outputLocationType": "none",
"inputOverride": "allow",
"outputOnStateChange": false,
"outputPayload": "$entity().state ? \"on\": \"off\"",
"outputPayloadType": "jsonata",
"x": 1050,
"y": 760,
"wires": [
[
"a8ae78a2.cc9eb8"
]
]
},
{
"id": "2e0d91f0.c63dde",
"type": "persist in",
"z": "7086a8e4.16a8f8",
"name": "Total Energy FV",
"storageNode": "f69cfabd.8fa068",
"x": 1440,
"y": 760,
"wires": []
},
{
"id": "341a1b24.396344",
"type": "persist in",
"z": "7086a8e4.16a8f8",
"name": "Year Energy FV",
"storageNode": "f69cfabd.8fa068",
"x": 1440,
"y": 820,
"wires": []
},
{
"id": "81372d36.c01ec",
"type": "persist in",
"z": "7086a8e4.16a8f8",
"name": "Month Energy FV",
"storageNode": "f69cfabd.8fa068",
"x": 1450,
"y": 880,
"wires": []
},
{
"id": "6b9cf5bd.f7953c",
"type": "persist in",
"z": "7086a8e4.16a8f8",
"name": "Day Energy FV",
"storageNode": "f69cfabd.8fa068",
"x": 1440,
"y": 940,
"wires": []
},
{
"id": "2057b196.d7e0ee",
"type": "inject",
"z": "7086a8e4.16a8f8",
"name": "At startup",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": "5",
"topic": "",
"payload": "",
"payloadType": "date",
"x": 90,
"y": 840,
"wires": [
[
"b064e3f7.ae9f8",
"537fcd87.462fd4",
"2819c996.dd1326",
"d18d6b56.051888"
]
]
},
{
"id": "b064e3f7.ae9f8",
"type": "persist out",
"z": "7086a8e4.16a8f8",
"name": "Total Energy FV",
"storageNode": "f69cfabd.8fa068",
"x": 320,
"y": 760,
"wires": [
[
"5256be29.98ca8"
]
]
},
{
"id": "537fcd87.462fd4",
"type": "persist out",
"z": "7086a8e4.16a8f8",
"name": "Year Energy FV",
"storageNode": "f69cfabd.8fa068",
"x": 320,
"y": 820,
"wires": [
[
"11b95515.178cdb"
]
]
},
{
"id": "2819c996.dd1326",
"type": "persist out",
"z": "7086a8e4.16a8f8",
"name": "Month Energy FV",
"storageNode": "f69cfabd.8fa068",
"x": 330,
"y": 880,
"wires": [
[
"9e7424d.ade43d8"
]
]
},
{
"id": "d18d6b56.051888",
"type": "persist out",
"z": "7086a8e4.16a8f8",
"name": "Day Energy FV",
"storageNode": "f69cfabd.8fa068",
"x": 320,
"y": 940,
"wires": [
[
"57bae8a0.722ce8"
]
]
},
{
"id": "a8ae78a2.cc9eb8",
"type": "change",
"z": "7086a8e4.16a8f8",
"name": "total",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.total",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1270,
"y": 760,
"wires": [
[
"2e0d91f0.c63dde"
]
]
},
{
"id": "e70c873c.784458",
"type": "change",
"z": "7086a8e4.16a8f8",
"name": "total",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.total",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1270,
"y": 820,
"wires": [
[
"341a1b24.396344"
]
]
},
{
"id": "a0705be0.0496f8",
"type": "change",
"z": "7086a8e4.16a8f8",
"name": "total",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.total",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1270,
"y": 880,
"wires": [
[
"81372d36.c01ec"
]
]
},
{
"id": "1fc542b2.53b63d",
"type": "change",
"z": "7086a8e4.16a8f8",
"name": "total",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.total",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1270,
"y": 940,
"wires": [
[
"6b9cf5bd.f7953c"
]
]
},
{
"id": "e2ba84de.a91c98",
"type": "switch",
"z": "7086a8e4.16a8f8",
"name": "Vazio",
"property": "vazio",
"propertyType": "flow",
"rules": [
{
"t": "eq",
"v": "on",
"vt": "str"
},
{
"t": "neq",
"v": "on",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 570,
"y": 460,
"wires": [
[
"1f8d67ce.e2f8a8",
"175967a4.618ae8",
"edbc7e86.9fe3e",
"f8bedfbd.a3da3"
],
[
"5256be29.98ca8",
"11b95515.178cdb",
"9e7424d.ade43d8",
"57bae8a0.722ce8"
]
]
},
{
"id": "2ca4b0ce.c26c6",
"type": "api-current-state",
"z": "7086a8e4.16a8f8",
"name": "Vazio",
"server": "56157d96.6354e4",
"version": 2,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.horario_vazio",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 270,
"y": 320,
"wires": [
[
"3f8dcb46.1da394"
]
]
},
{
"id": "29eadcff.d72894",
"type": "delay",
"z": "7086a8e4.16a8f8",
"name": "100ms",
"pauseType": "delay",
"timeout": "100",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"x": 270,
"y": 380,
"wires": [
[
"62300ae1.7645c4"
]
]
},
{
"id": "3f8dcb46.1da394",
"type": "change",
"z": "7086a8e4.16a8f8",
"name": "flow.vazio",
"rules": [
{
"t": "set",
"p": "vazio",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 420,
"y": 320,
"wires": [
[]
]
},
{
"id": "56157d96.6354e4",
"type": "server",
"name": "Home Assistant",
"version": 1,
"legacy": false,
"addon": true,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true
},
{
"id": "f69cfabd.8fa068",
"type": "persist-store",
"filename": "persistence.json",
"interval": "900"
}
]