I writed this nodered flow (I’ve bought a Model 3 last week) maybe it need a debug because I’m a newbie :
- when I start charging My Tesla M3, Nodered Ask me by Telegram if I want to charge Tesla by maximize self PV consumption or a manual charge
- if answer is “yes” then a function node calculates unused PV power (Inverter output power + PV power to grid)
- So if residual PV power is between a range interval es. 230W-460W a node set 2A tesla sensor “number.charging_amps”
- nodered wait until unused PW power is over than 230W or under 230W to repeat cycle and set a smaller or greater Ampere value in sensor “number.charging_amps”
- on sunset Nodered turn off the flow, same as Tesla’s Battery is 100% charged
- a check on Tesla’s charge = on avoid nodered loop to set Ampere uselessly
[{"id":"cda4cbac66948c9c","type":"tab","label":"Tesla","disabled":false,"info":"","env":[]},{"id":"d4fa434ed53dfa64","type":"telegrambot-switch","z":"cda4cbac66948c9c","name":"Scelta DLM","bot":"7ac1b2eced8b20a3","chatId":"57748018","question":"Vuoi gestire la ricarica dell'auto per massimizzare l'autoconsumo del fotovoltaico?","answers":["si","no"],"outputs":3,"autoAnswerCallback":true,"verticalAnswers":true,"timeoutValue":"1","timeoutUnits":"min","parseMode":"","x":290,"y":120,"wires":[["8a947ab0f9c6cc1b"],["8e2baf6ba25acb32"],["8a947ab0f9c6cc1b"]]},{"id":"7725f19802142a07","type":"trigger-state","z":"cda4cbac66948c9c","name":"Tesla Charge ON","server":"1c37c350.3f926d","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"switch.charger","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"previous_state","propertyValue":"old_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"off"},{"targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"on"}],"inputs":0,"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","enableInput":false,"x":80,"y":80,"wires":[["d4fa434ed53dfa64"],["3fbe5fb8508b6f43"]]},{"id":"22dc7b1664a7da58","type":"api-call-service","z":"cda4cbac66948c9c","name":"Auto","server":"1c37c350.3f926d","version":5,"debugenabled":false,"domain":"telegram_bot","service":"send_message","areaId":[],"deviceId":[],"entityId":[],"data":"{\"message\":\"ok avvio la gestione automatica!\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":750,"y":40,"wires":[["1f84fcfc79acc87e"]]},{"id":"8e2baf6ba25acb32","type":"api-call-service","z":"cda4cbac66948c9c","name":"Manual","server":"1c37c350.3f926d","version":5,"debugenabled":false,"domain":"telegram_bot","service":"send_message","areaId":[],"deviceId":[],"entityId":[],"data":"{\"message\":\"La gestione della ricarica proseguirà in modo manuale\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":380,"y":220,"wires":[["3fbe5fb8508b6f43"]]},{"id":"1f84fcfc79acc87e","type":"function","z":"cda4cbac66948c9c","name":"","func":"var power1 = global.get('homeassistant.homeAssistant.states[\"sensor.input_power\"].state');\nvar power2 = global.get('homeassistant.homeAssistant.states[\"sensor.charger_power\"].state');\nvar power3 = global.get('homeassistant.homeAssistant.states[\"sensor.active_power\"].state');\nvar power4 = global.get('homeassistant.homeAssistant.states[\"sensor.pv_to_grid_kwp\"].state');\n\nlet w1 = parseFloat(power1);\nlet w2 = parseFloat(power2);\nlet w3 = parseFloat(power3);\nlet w4 = parseFloat(power4);\n\nmsg.payload = w1 - w3 + w4 + (w2 * 1000) - 300;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":220,"wires":[["1dfa78e36e48e542","410ab08425cbf79b"]]},{"id":"1dfa78e36e48e542","type":"switch","z":"cda4cbac66948c9c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"lt","v":"230","vt":"str"},{"t":"btwn","v":"230","vt":"num","v2":"460","v2t":"num"},{"t":"btwn","v":"461","vt":"num","v2":"691","v2t":"num"},{"t":"btwn","v":"692","vt":"num","v2":"922","v2t":"num"},{"t":"btwn","v":"923","vt":"num","v2":"1153","v2t":"num"},{"t":"btwn","v":"1154","vt":"num","v2":"1384","v2t":"num"},{"t":"btwn","v":"1385","vt":"num","v2":"1615","v2t":"num"},{"t":"btwn","v":"1616","vt":"num","v2":"1846","v2t":"num"},{"t":"btwn","v":"1847","vt":"num","v2":"2077","v2t":"num"},{"t":"btwn","v":"2078","vt":"num","v2":"2308","v2t":"num"},{"t":"btwn","v":"2309","vt":"num","v2":"2539","v2t":"num"},{"t":"btwn","v":"2540","vt":"num","v2":"2770","v2t":"num"},{"t":"btwn","v":"2771","vt":"num","v2":"3001","v2t":"num"},{"t":"btwn","v":"3002","vt":"num","v2":"3232","v2t":"num"},{"t":"btwn","v":"3233","vt":"num","v2":"3463","v2t":"num"},{"t":"btwn","v":"3464","vt":"num","v2":"3694","v2t":"num"},{"t":"btwn","v":"3695","vt":"num","v2":"3925","v2t":"num"},{"t":"btwn","v":"3926","vt":"num","v2":"4156","v2t":"num"},{"t":"btwn","v":"4157","vt":"num","v2":"4387","v2t":"num"},{"t":"btwn","v":"4388","vt":"num","v2":"4618","v2t":"num"},{"t":"btwn","v":"4619","vt":"num","v2":"4849","v2t":"num"},{"t":"gte","v":"4850","vt":"num"}],"checkall":"false","repair":false,"outputs":22,"x":890,"y":260,"wires":[["b2c231128d26b2e1"],["7cec61285af7710c"],["a2022d91a8c24697"],["1ef1e04dba22a52b"],["25111e7925ed9ecc"],["b3f8c5d56d5d6b1c"],["e3fcf7f32ec8cb77"],["6e85ac0f1223a91f"],["5603f6d63da3317c"],["7c23d0da8b04505e"],["778a6599898376f1"],["fea9b4b36d73a950"],["77fbc0857669572d"],["7a5fc827c4cbdfcd"],["43c10d26bb957df3"],["1f90d56ebcd06f3c"],["9545f5a05c5554bb"],["122bd183a1b3b6b8"],["f518695425da67e4"],["9f3adf1edfa017dd"],["f76787dc7f3e551f"],["16927fc2ad18f84d"]]},{"id":"b2c231128d26b2e1","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":1}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":120,"wires":[["09d0a58c1fa54ce0"]]},{"id":"7cec61285af7710c","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":2}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":160,"wires":[["09d0a58c1fa54ce0"]]},{"id":"a2022d91a8c24697","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":3}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":200,"wires":[["09d0a58c1fa54ce0"]]},{"id":"25111e7925ed9ecc","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":5}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":280,"wires":[["09d0a58c1fa54ce0"]]},{"id":"1ef1e04dba22a52b","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":4}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":240,"wires":[["09d0a58c1fa54ce0"]]},{"id":"b3f8c5d56d5d6b1c","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":6}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":320,"wires":[["09d0a58c1fa54ce0"]]},{"id":"e3fcf7f32ec8cb77","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":7}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":360,"wires":[["09d0a58c1fa54ce0"]]},{"id":"6e85ac0f1223a91f","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":8}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":400,"wires":[["09d0a58c1fa54ce0"]]},{"id":"fea9b4b36d73a950","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":12}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":560,"wires":[["09d0a58c1fa54ce0"]]},{"id":"77fbc0857669572d","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":13}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":600,"wires":[["09d0a58c1fa54ce0"]]},{"id":"778a6599898376f1","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":11}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":520,"wires":[["09d0a58c1fa54ce0"]]},{"id":"7c23d0da8b04505e","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":10}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":480,"wires":[["09d0a58c1fa54ce0"]]},{"id":"5603f6d63da3317c","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":9}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":440,"wires":[["09d0a58c1fa54ce0"]]},{"id":"7a5fc827c4cbdfcd","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":14}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":640,"wires":[["09d0a58c1fa54ce0"]]},{"id":"43c10d26bb957df3","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":15}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":680,"wires":[["09d0a58c1fa54ce0"]]},{"id":"9545f5a05c5554bb","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":17}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":760,"wires":[["09d0a58c1fa54ce0"]]},{"id":"1f90d56ebcd06f3c","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":16}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":720,"wires":[["09d0a58c1fa54ce0"]]},{"id":"122bd183a1b3b6b8","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":18}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":800,"wires":[["09d0a58c1fa54ce0"]]},{"id":"f76787dc7f3e551f","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":21}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":920,"wires":[["09d0a58c1fa54ce0"]]},{"id":"9f3adf1edfa017dd","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":20}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":880,"wires":[["09d0a58c1fa54ce0"]]},{"id":"f518695425da67e4","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":19}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":840,"wires":[["09d0a58c1fa54ce0"]]},{"id":"16927fc2ad18f84d","type":"api-call-service","z":"cda4cbac66948c9c","name":"Set Amp Value","server":"1c37c350.3f926d","version":5,"debugenabled":true,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.charging_amps"],"data":"{\"value\":22}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":960,"wires":[["09d0a58c1fa54ce0"]]},{"id":"b007dee0136dbed1","type":"inject","z":"cda4cbac66948c9c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":140,"wires":[["1f84fcfc79acc87e"]]},{"id":"410ab08425cbf79b","type":"ha-sensor","z":"cda4cbac66948c9c","name":"PV avaible for Tesla","entityConfig":"ede6040ad88b4bc3","version":0,"state":"payload","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":690,"y":340,"wires":[[]]},{"id":"09d0a58c1fa54ce0","type":"ha-wait-until","z":"cda4cbac66948c9c","name":"waith power is 1","server":"1c37c350.3f926d","version":2,"outputs":2,"entityId":"sensor.pwleft_for_tesla","entityIdFilterType":"exact","property":"state","comparator":"is","value":"1","valueType":"num","timeout":"150","timeoutType":"num","timeoutUnits":"seconds","checkCurrentState":false,"blockInputOverrides":false,"outputProperties":[],"entityLocation":"data","entityLocationType":"none","x":1460,"y":480,"wires":[["77a18864989d7823"],["77a18864989d7823"]]},{"id":"77a18864989d7823","type":"api-current-state","z":"cda4cbac66948c9c","name":"check 1 again","server":"1c37c350.3f926d","version":3,"outputs":2,"halt_if":"1","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.pwleft_for_tesla","state_type":"str","blockInputOverrides":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"60","forType":"num","forUnits":"seconds","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":1500,"y":360,"wires":[["a385dcc1806a30a3"],["53c346490c537f93"]]},{"id":"53c346490c537f93","type":"delay","z":"cda4cbac66948c9c","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1800,"y":500,"wires":[["77a18864989d7823"]]},{"id":"04a35f51460f31f9","type":"time-range-switch","z":"cda4cbac66948c9c","name":"Set Sun","lat":"38.953554","lon":"16.285832","startTime":"sunrise","endTime":"sunset","startOffset":"0","endOffset":"-30","x":1360,"y":80,"wires":[["1f84fcfc79acc87e"],["8cfa908163bb902b"]]},{"id":"8cfa908163bb902b","type":"api-call-service","z":"cda4cbac66948c9c","name":"Off on Sunset!","server":"1c37c350.3f926d","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.charger"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1600,"y":80,"wires":[["bca3780193b5c1b3"]]},{"id":"96e908d56d2d7f6a","type":"api-current-state","z":"cda4cbac66948c9c","name":"if on Charger","server":"1c37c350.3f926d","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.charger","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":1450,"y":180,"wires":[["04a35f51460f31f9"],[]]},{"id":"3fbe5fb8508b6f43","type":"api-call-service","z":"cda4cbac66948c9c","name":"Off DLM Switch","server":"1c37c350.3f926d","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.pv_dlm_button"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":400,"y":300,"wires":[[]]},{"id":"8a947ab0f9c6cc1b","type":"api-call-service","z":"cda4cbac66948c9c","name":"On DLM Switch","server":"1c37c350.3f926d","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.pv_dlm_button"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":540,"y":60,"wires":[["22dc7b1664a7da58"]]},{"id":"1662c9f1eb796f6d","type":"api-current-state","z":"cda4cbac66948c9c","name":"if on DLM Switch","server":"1c37c350.3f926d","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.pv_dlm_button","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":1490,"y":260,"wires":[["96e908d56d2d7f6a"],[]]},{"id":"bca3780193b5c1b3","type":"api-call-service","z":"cda4cbac66948c9c","name":"Off DLM Switch","server":"1c37c350.3f926d","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.pv_dlm_button"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1820,"y":80,"wires":[[]]},{"id":"48c5dd0d1da99315","type":"cronplus","z":"cda4cbac66948c9c","name":"Pool on Sunrise","outputField":"payload","timeZone":"","persistDynamic":false,"commandResponseMsgOutput":"output1","outputs":1,"options":[{"name":"schedule1","topic":"topic1","payloadType":"default","payload":"","expressionType":"solar","expression":"0 30 20 * * *","location":"38.95349692898102 16.28588925115764","offset":"15","solarType":"selected","solarEvents":"sunrise"}],"x":120,"y":340,"wires":[["8e764f86a3b8e328"]]},{"id":"8e764f86a3b8e328","type":"api-call-service","z":"cda4cbac66948c9c","name":"Pooling on","server":"1c37c350.3f926d","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.polling"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":330,"y":400,"wires":[[]]},{"id":"c89cbdf9186dbe41","type":"cronplus","z":"cda4cbac66948c9c","name":"Pool off Sunset","outputField":"payload","timeZone":"","persistDynamic":false,"commandResponseMsgOutput":"output1","outputs":1,"options":[{"name":"schedule1","topic":"topic1","payloadType":"default","payload":"","expressionType":"solar","expression":"0 30 20 * * *","location":"38.95349692898102 16.28588925115764","offset":"15","solarType":"selected","solarEvents":"sunset"}],"x":120,"y":440,"wires":[["dca700937fda58dd"]]},{"id":"dca700937fda58dd","type":"api-call-service","z":"cda4cbac66948c9c","name":"Pooling off","server":"1c37c350.3f926d","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.polling"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":330,"y":500,"wires":[[]]},{"id":"a385dcc1806a30a3","type":"api-current-state","z":"cda4cbac66948c9c","name":"if batt lev < 100%","server":"1c37c350.3f926d","version":3,"outputs":2,"halt_if":"100","halt_if_type":"num","halt_if_compare":"lt","entity_id":"sensor.battery","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":1770,"y":360,"wires":[["1662c9f1eb796f6d"],["601c54e86a00ccfc"]]},{"id":"601c54e86a00ccfc","type":"api-call-service","z":"cda4cbac66948c9c","name":"Off DLM Switch","server":"1c37c350.3f926d","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.charger"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1860,"y":420,"wires":[[]]},{"id":"7ac1b2eced8b20a3","type":"telegrambot-config","botname":"Casa Lamezia - Home Assistant","usernames":"","chatIds":"57748018","pollInterval":"300"},{"id":"1c37c350.3f926d","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"id","deviceSelector":"id","entitySelector":"id","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"ede6040ad88b4bc3","type":"ha-entity-config","server":"1c37c350.3f926d","deviceConfig":"a08c40dd19ee2726","name":"pv 4 tesla","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"pv 4 tesla"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":"power"},{"property":"unit_of_measurement","value":"W"},{"property":"state_class","value":""}],"resend":false,"debugEnabled":false},{"id":"a08c40dd19ee2726","type":"ha-device-config","name":"pv 4 tesla","hwVersion":"","manufacturer":"Node-RED","model":"","swVersion":""}]