Hi I’m still new to HA and Node Red and I’m trying to do the following:
in night mode, I want to switch all heaters which are in auto mode to “eco” mode (which consists in switching in manual mode with a user defined temperature)
I have set an ‘input_number.input_eco’ with the desired temperature
then I have a “get entities” node for filtering the heaters going into a “service call” node with ‘set_temperature’ service to switch the heaters to the right mode and temperature
the issue is to get the desired temperature value so I added a “current state” node to get the value but now I’m not sure how to use the values from the “get entities” node and the “current state” node
here is the flow:
[{"id":"4d567fc2.c426d","type":"ha-get-entities","z":"9cceba3d.e22d68","server":"120937af.20abe8","name":"Liste radiateurs en auto","rules":[{"property":"entity_id","logic":"starts_with","value":"climate","valueType":"str"},{"property":"attributes.operation_mode","logic":"is","value":"auto","valueType":"str"}],"output_type":"split","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":302,"y":560,"wires":[["8290a6e9.3310f8","ef6aa122.352248"]]},{"id":"dd9101e8.0fc4b8","type":"api-call-service","z":"9cceba3d.e22d68","name":"passer en eco","server":"120937af.20abe8","service_domain":"climate","service":"set_temperature","data":"{\"temperature\": {{ flow.payload }}, \"operation_mode\": \"manual\"}","render_data":true,"mergecontext":"","output_location":"payload","output_location_type":"msg","x":700,"y":555,"wires":[[]]},{"id":"5617cb8a.20efac","type":"trigger-state","z":"9cceba3d.e22d68","name":"Mode nuit","server":"120937af.20abe8","entityid":"input_select.home_mode","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"id":"8htoxr8fjxc","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"nuit"},{"id":"thxu0dg1yz","targetType":"this_entity","targetValue":"","propertyType":"previous_state","propertyValue":"old_state.state","comparatorType":"is_not","comparatorValueDatatype":"str","comparatorValue":"nuit"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":94,"y":596,"wires":[["4d567fc2.c426d","d73453da.07e72"],[]]},{"id":"ef6aa122.352248","type":"api-current-state","z":"9cceba3d.e22d68","name":"temperature eco","server":"120937af.20abe8","outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_number.input_eco","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":518,"y":614,"wires":[["dd9101e8.0fc4b8"]]},{"id":"8290a6e9.3310f8","type":"debug","z":"9cceba3d.e22d68","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":556.5,"y":496,"wires":[]},{"id":"d73453da.07e72","type":"api-call-service","z":"9cceba3d.e22d68","name":"Fermer tous les volets","server":"120937af.20abe8","service_domain":"cover","service":"close_cover","data":"{\"entity_id\":\"group.all_covers\"}","render_data":false,"mergecontext":"","output_location":"payload","output_location_type":"msg","x":390.5,"y":728,"wires":[[]]},{"id":"120937af.20abe8","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open"}]
thanks for your help!