Dear all,
I need a slider for setting my temperature in climate entities to better control them in a room card. I created a helper for this input_number.keller_buro_heizung_zieltemperatur
. I can set the temperature with the top node-red-flow (see attached picture).
The challenge is, that the input_number shall also be set to the correct value, when the temperature of the climate entity is set somewhwer else. For this I created the lower node-red-flow. This also works.
My question is now, is there maybe a better way to do this? Because it seems, that in my flow there is a kind of (bad?) interaction between the top and the lower flow. If I change the temperature via input_number (top flow) of course the temperature in the climate entity is changed => The bottom flow is also triggered and vice versa.
Node-RED export
[{"id":"5f791ee6aba5b9a3","type":"server-state-changed","z":"916ac106527864fc","name":"Heating target temperature input_number changed","server":"7211bec6.fcfb3","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_number.keller_buro_heizung_zieltemperatur","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":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":210,"y":1660,"wires":[["6d9ca21716e0cf71"]]},{"id":"816c7f63e9c25b28","type":"api-call-service","z":"916ac106527864fc","name":"Set climate target temperature","server":"7211bec6.fcfb3","version":5,"debugenabled":false,"domain":"climate","service":"set_temperature","areaId":[],"deviceId":["109b8603c323a2cb933059ca0f2d0ccd"],"entityId":[],"data":"{\"temperature\": msg.payload}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1190,"y":1660,"wires":[[]]},{"id":"62dd2eab9904196d","type":"change","z":"916ac106527864fc","name":"Transform String to Number","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number(msg.payload)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":900,"y":1660,"wires":[["816c7f63e9c25b28"]]},{"id":"c5e2e97389e1936c","type":"server-state-changed","z":"916ac106527864fc","name":"Heating target temperature climate changed","server":"7211bec6.fcfb3","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"climate.keller_buro_heizung_thermostat","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":false,"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":190,"y":1780,"wires":[["d20ffcfb4906b4be"]]},{"id":"2f7d8f5406f06635","type":"api-call-service","z":"916ac106527864fc","name":"Set input_number target temperature","server":"7211bec6.fcfb3","version":5,"debugenabled":false,"domain":"input_number","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_number.keller_buro_heizung_zieltemperatur"],"data":"{\"value\": msg.payload}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1210,"y":1780,"wires":[[]]},{"id":"d4fc5748b685042e","type":"change","z":"916ac106527864fc","name":"Transform Number to String","rules":[{"t":"set","p":"payload","pt":"msg","to":"$string(data.new_state.attributes.temperature)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":900,"y":1780,"wires":[["2f7d8f5406f06635"]]},{"id":"d20ffcfb4906b4be","type":"switch","z":"916ac106527864fc","name":"Target temperature really changed?","property":"data.old_state.attributes.temperature","propertyType":"msg","rules":[{"t":"neq","v":"data.new_state.attributes.temperature","vt":"msg"},{"t":"eq","v":"data.new_state.attributes.temperature","vt":"msg"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":1780,"wires":[["d4fc5748b685042e"],[]]},{"id":"6d9ca21716e0cf71","type":"switch","z":"916ac106527864fc","name":"Target temperature really changed?","property":"data.old_state.state","propertyType":"msg","rules":[{"t":"neq","v":"data.new_state.state","vt":"msg"},{"t":"eq","v":"data.new_state.state","vt":"msg"}],"checkall":"true","repair":false,"outputs":2,"x":590,"y":1660,"wires":[["62dd2eab9904196d"],[]]},{"id":"7211bec6.fcfb3","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"}]
THX