Router des panneau solaire sur node red

Bonjour a tous,

Je me lance sur nod red car HA est limiter
Je possede une installation de panneau solaire et je souhaite injecter le moins mon surplus.
de production de panneau solaire sur un radiateur electrique piloter par un dimmer robodyn qui est montée sur un esp32 sous esphome.

J’ai une entity.pv_router qui mesure la puissance et le sens de mon courant de mon tableau electrique , j’ai deja un dimmer autonome qui alimente un cumulus dont j’arrive a recuperer ca valeur qui est de 0 à 100 qui a pour entity.dimmer1

Sur node red j’essai de creer une fonction qui me dit que si j’ai le dimmer1 à 100 et que mon pv_router est à -80, j’ai une reponse 2 qui allumera un radiateur electrique sinon reponse 3 donc rien

j’ai cree ca mais j’obtiens toujours le reponse 3

[{"id":"81327303058dce43","type":"tab","label":"router PV","disabled":false,"info":""},{"id":"de4417d697ccfc10","type":"debug","z":"81327303058dce43","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":990,"y":120,"wires":[]},{"id":"90ea28a02de0dced","type":"server-state-changed","z":"81327303058dce43","name":"router","server":"d50a0baf.aca4d8","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.pv_router","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"router","valueType":"str"},{"property":"topic","propertyType":"msg","value":"","valueType":"eventData"}],"x":110,"y":40,"wires":[[]]},{"id":"bfea4cecfe3c412e","type":"server-state-changed","z":"81327303058dce43","name":"dimmer1","server":"d50a0baf.aca4d8","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.dimmer_router","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":200,"wires":[[]]},{"id":"8ad8e87aabb7ac55","type":"join","z":"81327303058dce43","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":610,"y":120,"wires":[["89e7fe791d550be3","4fb1eb308ff53b8e"]]},{"id":"6489906fdc47e5ed","type":"inject","z":"81327303058dce43","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"80","payload":"dimmer1","payloadType":"str","x":110,"y":260,"wires":[["8ad8e87aabb7ac55","0e27b7c895a9d571"]]},{"id":"89e7fe791d550be3","type":"function","z":"81327303058dce43","name":"","func":"\nvar dimmer1 = Number(msg.payload.dimmer1);\nvar router = Number(msg.payload.router);\n\nnode.status({text:dimmer1+\" \"+router});\n\nif (router <= -80 && dimmer1 <= 60) {\n    msg.payload = 2;\n}\nelse {\n    msg.payload = 3;\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":120,"wires":[["de4417d697ccfc10"]]},{"id":"8eedc3d03aeb0f6d","type":"inject","z":"81327303058dce43","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"-400","payload":"router","payloadType":"str","x":120,"y":100,"wires":[["8ad8e87aabb7ac55","d67990699435a862"]]},{"id":"0e27b7c895a9d571","type":"debug","z":"81327303058dce43","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":290,"y":300,"wires":[]},{"id":"d67990699435a862","type":"debug","z":"81327303058dce43","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":290,"y":140,"wires":[]},{"id":"4fb1eb308ff53b8e","type":"debug","z":"81327303058dce43","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":650,"y":260,"wires":[]},{"id":"d50a0baf.aca4d8","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}]

merci pour vos conseils

System Health

version core-2021.9.0b3
installation_type Home Assistant Supervised
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.9.6
os_name Linux
os_version 4.19.0-17-amd64
arch x86_64
timezone Europe/Paris
Home Assistant Community Store
GitHub API ok
Github API Calls Remaining 4616
Installed Version 1.14.1
Stage running
Available Repositories 889
Installed Repositories 63
AccuWeather
can_reach_server ok
remaining_requests 26
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Debian GNU/Linux 10 (buster)
update_channel beta
supervisor_version supervisor-2021.08.0
docker_version 20.10.8
disk_total 113.6 GB
disk_used 19.4 GB
healthy true
supported true
supervisor_api ok
version_api ok
installed_addons Samba share (9.5.1), MQTT Server & Web client (1.2.0), Terminal & SSH (9.1.3), Spotify Connect (0.9.1), Grafana (7.2.0), Node-RED (10.0.0), Tydom2MQTT - Beta (release_1.2.1), InfluxDB (4.2.1), File editor (5.3.3), Zigbee2mqtt (1.21.0-4), Glances (0.13.0), Dnsmasq (1.4.4), Duck DNS (1.13.0), Visual Studio Code (3.6.2), ESPHome (2021.8.2)
Lovelace
dashboards 3
resources 42
views 17
mode storage
Spotify
api_endpoint_reachable ok

En quoi ? Car toute l’explication qui suit est totalement réalisable dans HA

j’ai deja mes router et dimmer sur node car il exporte du json a la base pour domoticz.
je souhaite rester sur node.

j’essais de creer la fonction qui me dis que suis je recois payload 2 j’augmente mon dimmer light de 5
et si je recois le payload 3 je diminue de 5.

[{"id":"f730b8886cd06364","type":"group","z":"5ea524e2.ed04ac","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["2c77bb4551c7228a","cfa035f49de5b824","f3d265ce24b50acf","69a6d88706a3eb2f","3cbcb92c112b2ab3","104e716d871c02a9","87212c0bccce8367","c7adc6afa1c0cb3a","c64a09f66866b124","e8bb449da04df82a","13ac797b3b0938f7","9d642ad122f6230d","92c34e2b2157ca3e","308da87c44a65bbc","833a2a401425981d","be1ae5c6855d8ff2","2b5433c1f7f3ed70"],"x":54,"y":379,"w":1292,"h":422},{"id":"2c77bb4551c7228a","type":"comment","z":"5ea524e2.ed04ac","g":"f730b8886cd06364","name":"Router 2 radiateur","info":"","x":170,"y":420,"wires":[]},{"id":"cfa035f49de5b824","type":"server-state-changed","z":"5ea524e2.ed04ac","g":"f730b8886cd06364","name":"PV router","server":"d50a0baf.aca4d8","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.pv_router","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"pvrouter","valueType":"str"}],"x":160,"y":480,"wires":[[]]},{"id":"f3d265ce24b50acf","type":"server-state-changed","z":"5ea524e2.ed04ac","g":"f730b8886cd06364","name":"Dimmer router","server":"d50a0baf.aca4d8","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.dimmer_router","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"pvdimmer","valueType":"str"}],"x":170,"y":660,"wires":[[]]},{"id":"69a6d88706a3eb2f","type":"join","z":"5ea524e2.ed04ac","g":"f730b8886cd06364","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":410,"y":620,"wires":[["87212c0bccce8367","c7adc6afa1c0cb3a"]]},{"id":"3cbcb92c112b2ab3","type":"inject","z":"5ea524e2.ed04ac","g":"f730b8886cd06364","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"pvrouter","payload":"-400","payloadType":"num","x":170,"y":540,"wires":[["69a6d88706a3eb2f"]]},{"id":"104e716d871c02a9","type":"inject","z":"5ea524e2.ed04ac","g":"f730b8886cd06364","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"pvdimmer","payload":"100","payloadType":"num","x":170,"y":720,"wires":[["69a6d88706a3eb2f"]]},{"id":"87212c0bccce8367","type":"debug","z":"5ea524e2.ed04ac","g":"f730b8886cd06364","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":680,"wires":[]},{"id":"c7adc6afa1c0cb3a","type":"function","z":"5ea524e2.ed04ac","g":"f730b8886cd06364","name":"","func":"var pvdimmer = Number(msg.payload.pvdimmer);\nvar pvrouter = Number(msg.payload.pvrouter);\n\nnode.status({text:pvdimmer+\" \"+pvrouter});\n\nif (pvrouter <= -200 && pvdimmer >= 100) {\n    msg.payload = 2;\n}\nelse {\n    msg.payload = 3;\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":640,"y":620,"wires":[["e8bb449da04df82a"]]},{"id":"c64a09f66866b124","type":"debug","z":"5ea524e2.ed04ac","g":"f730b8886cd06364","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1030,"y":620,"wires":[]},{"id":"e8bb449da04df82a","type":"switch","z":"5ea524e2.ed04ac","g":"f730b8886cd06364","name":"Filtre","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"3","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":810,"y":620,"wires":[["c64a09f66866b124","92c34e2b2157ca3e"],["c64a09f66866b124","308da87c44a65bbc"]]},{"id":"13ac797b3b0938f7","type":"inject","z":"5ea524e2.ed04ac","g":"f730b8886cd06364","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"pvrouter","payload":"100","payloadType":"str","x":170,"y":580,"wires":[["69a6d88706a3eb2f"]]},{"id":"9d642ad122f6230d","type":"inject","z":"5ea524e2.ed04ac","g":"f730b8886cd06364","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"pvdimmer","payload":"40","payloadType":"str","x":170,"y":760,"wires":[["69a6d88706a3eb2f"]]},{"id":"92c34e2b2157ca3e","type":"api-call-service","z":"5ea524e2.ed04ac","g":"f730b8886cd06364","name":"Lampe TV plus","server":"d50a0baf.aca4d8","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lampe_tv","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":420,"wires":[["833a2a401425981d"]]},{"id":"308da87c44a65bbc","type":"api-call-service","z":"5ea524e2.ed04ac","g":"f730b8886cd06364","name":"Lampe TV Min","server":"d50a0baf.aca4d8","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lampe_tv","data":"{\t    \"brightness\": \"10\"\t    \t}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":740,"wires":[[]]},{"id":"833a2a401425981d","type":"debug","z":"5ea524e2.ed04ac","g":"f730b8886cd06364","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1230,"y":420,"wires":[]},{"id":"be1ae5c6855d8ff2","type":"mqtt in","z":"5ea524e2.ed04ac","g":"f730b8886cd06364","name":"","topic":"zigbee2mqtt/bridge/#","qos":"2","datatype":"auto","broker":"5a120b36.df9674","nl":false,"rap":true,"rh":0,"x":490,"y":440,"wires":[[]]},{"id":"2b5433c1f7f3ed70","type":"function","z":"5ea524e2.ed04ac","g":"f730b8886cd06364","name":"","func":"varBright = msg.brightness;\nif (varBright < 200) {varBrightness = varBright - 50}\nelse {varBrightness = 254}\nmsg.payload.data = {\"brightness\":varBrightness}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":820,"y":760,"wires":[[]]},{"id":"d50a0baf.aca4d8","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":"5a120b36.df9674","type":"mqtt-broker","name":"MQTT","broker":"192.168.1.20","port":"1883","clientid":"node-red-dynamic","usetls":false,"compatmode":false,"protocolVersion":"4","keepalive":"60","cleansession":false,"birthTopic":"","birthQos":"0","birthRetain":"true","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"true","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"true","willPayload":"","willMsg":{},"sessionExpiry":""}]

voici la solution

[{"id":"b95a8177cf74187e","type":"group","z":"5ea524e2.ed04ac","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["2c77bb4551c7228a","cfa035f49de5b824","f3d265ce24b50acf","69a6d88706a3eb2f","3cbcb92c112b2ab3","104e716d871c02a9","c7adc6afa1c0cb3a","e8bb449da04df82a","13ac797b3b0938f7","9d642ad122f6230d","92c34e2b2157ca3e","308da87c44a65bbc","833a2a401425981d","2b5433c1f7f3ed70","4671a11d7f03270e","b2995067f109caf3","9ddbf7c0a55c0c5d","b1795d622be60a39"],"x":34,"y":379,"w":1212,"h":422},{"id":"2c77bb4551c7228a","type":"comment","z":"5ea524e2.ed04ac","g":"b95a8177cf74187e","name":"Router 2 radiateur","info":"","x":150,"y":420,"wires":[]},{"id":"cfa035f49de5b824","type":"server-state-changed","z":"5ea524e2.ed04ac","g":"b95a8177cf74187e","name":"PV router","server":"d50a0baf.aca4d8","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.pv_router","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"pvrouter","valueType":"str"}],"x":140,"y":480,"wires":[["69a6d88706a3eb2f"]]},{"id":"f3d265ce24b50acf","type":"server-state-changed","z":"5ea524e2.ed04ac","g":"b95a8177cf74187e","name":"Dimmer router","server":"d50a0baf.aca4d8","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.dimmer_router","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"pvdimmer","valueType":"str"}],"x":150,"y":660,"wires":[["69a6d88706a3eb2f"]]},{"id":"69a6d88706a3eb2f","type":"join","z":"5ea524e2.ed04ac","g":"b95a8177cf74187e","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":370,"y":620,"wires":[["c7adc6afa1c0cb3a"]]},{"id":"3cbcb92c112b2ab3","type":"inject","z":"5ea524e2.ed04ac","g":"b95a8177cf74187e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"pvrouter","payload":"-400","payloadType":"num","x":150,"y":540,"wires":[["69a6d88706a3eb2f"]]},{"id":"104e716d871c02a9","type":"inject","z":"5ea524e2.ed04ac","g":"b95a8177cf74187e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"pvdimmer","payload":"100","payloadType":"num","x":150,"y":720,"wires":[["69a6d88706a3eb2f"]]},{"id":"c7adc6afa1c0cb3a","type":"function","z":"5ea524e2.ed04ac","g":"b95a8177cf74187e","name":"","func":"var pvdimmer = Number(msg.payload.pvdimmer);\nvar pvrouter = Number(msg.payload.pvrouter);\n\nnode.status({text:pvdimmer+\" \"+pvrouter});\n\nif (pvrouter <= -200 && pvdimmer >= 100) {\n    msg.payload = 2;\n}\nelse {\n    msg.payload = 3;\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":540,"y":620,"wires":[["e8bb449da04df82a"]]},{"id":"e8bb449da04df82a","type":"switch","z":"5ea524e2.ed04ac","g":"b95a8177cf74187e","name":"Filtre","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"3","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":690,"y":620,"wires":[["4671a11d7f03270e"],["9ddbf7c0a55c0c5d"]]},{"id":"13ac797b3b0938f7","type":"inject","z":"5ea524e2.ed04ac","g":"b95a8177cf74187e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"pvrouter","payload":"100","payloadType":"str","x":150,"y":580,"wires":[["69a6d88706a3eb2f"]]},{"id":"9d642ad122f6230d","type":"inject","z":"5ea524e2.ed04ac","g":"b95a8177cf74187e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"pvdimmer","payload":"40","payloadType":"str","x":150,"y":760,"wires":[["69a6d88706a3eb2f"]]},{"id":"92c34e2b2157ca3e","type":"api-call-service","z":"5ea524e2.ed04ac","g":"b95a8177cf74187e","name":"Lampe TV plus","server":"d50a0baf.aca4d8","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lampe_tv","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":920,"y":600,"wires":[["833a2a401425981d"]]},{"id":"308da87c44a65bbc","type":"api-call-service","z":"5ea524e2.ed04ac","g":"b95a8177cf74187e","name":"Lampe TV Min","server":"d50a0baf.aca4d8","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lampe_tv","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":920,"y":660,"wires":[["833a2a401425981d"]]},{"id":"833a2a401425981d","type":"debug","z":"5ea524e2.ed04ac","g":"b95a8177cf74187e","name":"","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1150,"y":620,"wires":[]},{"id":"2b5433c1f7f3ed70","type":"function","z":"5ea524e2.ed04ac","g":"b95a8177cf74187e","name":"","func":"newmsg = {};\n\n    brightness = msg.data.attributes.brightness + 10;\n    if (brightness < 30)\n    { msg.payload = \"off\";}\n\n\nmsg.data = {\"brightness\":brightness};\n\nnewmsg.payload = { data: {\"brightness\":brightness} };\n\nreturn newmsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":500,"wires":[["92c34e2b2157ca3e"]]},{"id":"4671a11d7f03270e","type":"api-current-state","z":"5ea524e2.ed04ac","g":"b95a8177cf74187e","name":"etat","server":"d50a0baf.aca4d8","version":2,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.lampe_tv","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":370,"y":500,"wires":[["b1795d622be60a39"]]},{"id":"b2995067f109caf3","type":"function","z":"5ea524e2.ed04ac","g":"b95a8177cf74187e","name":"","func":"newmsg = {};\n\n    brightness = msg.data.attributes.brightness - 10;\n    if (brightness < 10)\n    { msg.payload = \"off\";}\n\n\nmsg.data = {\"brightness\":brightness};\n\nnewmsg.payload = { data: {\"brightness\":brightness} };\n\nreturn newmsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":740,"y":720,"wires":[["308da87c44a65bbc"]]},{"id":"9ddbf7c0a55c0c5d","type":"api-current-state","z":"5ea524e2.ed04ac","g":"b95a8177cf74187e","name":"etat","server":"d50a0baf.aca4d8","version":2,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.lampe_tv","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":370,"y":720,"wires":[["b2995067f109caf3"]]},{"id":"b1795d622be60a39","type":"api-call-service","z":"5ea524e2.ed04ac","g":"b95a8177cf74187e","name":"Lampe TV On","server":"d50a0baf.aca4d8","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lampe_tv","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":560,"y":500,"wires":[["2b5433c1f7f3ed70"]]},{"id":"d50a0baf.aca4d8","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}]

Et tu pourras répondre à ma question ?

Je suis curieux et cela peut aider les autres à s’orienter vers une solution plus efficace :+1:

Clemalex,

j’étais sur domoticz avec un router avec un esp32 qui est le maître et un dimmer avec esp32 qui etait esclave qui ont ete programmé sur Arduino.

Je suis passé sur HA car beaucoup plus performant et ludique.

Pour recuperer mes informations du router je savais qu’il donnais des informations sur mqtt.

Donc pour recuperer mes informations j’etais passé sur NOD par l’aide d’un membre du forum donc comme c’est un 2e dimmer je le laisse sur NOD et je n’ai pas les compétences a faire la meme chose sur HA automatisation.

Si tu as du temps et me le traduire en automatisation pour ma culture HA :wink:.

J’espère avoir répondu au mieux a ta question

Se traduit donc par :

Je me lance dans Node-RED car mes compétences en YAML me font défaut pour le faire sous HA ?

C’est ça ?

C’est pas péjoratif. C’est le point fort de Node-RED d’être orienté click-and-paste… :innocent:

c’est exactement ca. les templates est vraiment compliqué a comprendre j’ai beau lire et relire la doc c’est pas tres clair quand tu sors des clous pour moi

1 « J'aime »

Bonjour
Est-ce que cette automatisation est possible avec uniquement HA?
J’ai un dimmer sur esp32.
Merci pour ton aide.

Salut

tu as plein de solutions

www.f1atb.](https://f1atb.fr/fr/routeur-photovoltaique-installation-rapide-du-logiciel/

https://domo.rem81.com/index.php/2023/07/18/pv-routeur-solaire/

sans competer celles sur le forum
https://forum-photovoltaique.fr/viewforum.php?f=110