Hello, Two sliders to one payload (clock time)

Hi all

Here ony question. I try to get my sliders to work with my node red flow, but not get that working perfectly.

Here is my flow:

Blockquote
[{"id":"bfff0ca.6ef8bf","type":"tab","label":"Autolämmitys","disabled":false,"info":""},{"id":"1eca59d3.b71666","type":"server-state-changed","z":"bfff0ca.6ef8bf","name":"Slider hour","server":"64727c95.4148c4","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.auto_ajastin_hour","entityidfiltertype":"exact","outputinitially":true,"state_type":"num","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":120,"y":60,"wires":[["292ce9f2.c2e516"]]},{"id":"d117955c.61b0f8","type":"server-state-changed","z":"bfff0ca.6ef8bf","name":"Slider min","server":"64727c95.4148c4","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.auto_ajastin_min","entityidfiltertype":"exact","outputinitially":true,"state_type":"num","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":120,"y":120,"wires":[["292ce9f2.c2e516"]]},{"id":"292ce9f2.c2e516","type":"join","z":"bfff0ca.6ef8bf","name":"join","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":":","joinerType":"str","accumulate":false,"timeout":"22","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":350,"y":60,"wires":[["f897c486.0b92a8"]]},{"id":"b1cb264b.883548","type":"eztimer","z":"bfff0ca.6ef8bf","name":"Test ez timer","debug":false,"autoname":"17:00 - 11:00:00","tag":"eztimer","topic":"","suspended":false,"sendEventsOnSuspend":false,"latLongSource":"haZone","latLongHaZone":"zone.home","lat":"60.2159","lon":"24.8961","timerType":"1","startupMessage":true,"ontype":"2","ontimesun":"dawn","ontimetod":"17:00","onpropertytype":"msg","onproperty":"payload","onvaluetype":"num","onvalue":1,"onoffset":0,"onrandomoffset":0,"onsuppressrepeats":false,"offtype":"2","offtimesun":"dusk","offtimetod":"11:00:00","offduration":"00:01:00","offpropertytype":"msg","offproperty":"payload","offvaluetype":"num","offvalue":0,"offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"resend":false,"resendInterval":"0s","mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":790,"y":60,"wires":[]},{"id":"f897c486.0b92a8","type":"change","z":"bfff0ca.6ef8bf","name":"payload to payload.ontime","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.ontime","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":60,"wires":[["b1cb264b.883548"]]},{"id":"64727c95.4148c4","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
Blockquote

Try to get my eztimer to get payload.ontime 22:22 example. Right now that work ok if you move sliders same time and move first hour and after that minute slider. But if you move them different time, eztimer get only hour or only minute value.

Hopefully someone can help me what kind nodes i get this working property easiest way.

You can joined the messages as a object and then concat the object using a function node or a change node.

I did notice that your change node look aged with missing items in dropdown, so the change node may not work if your node-red is old. if so update node-red or use a function node.

[{"id":"70dac812.ce7c48","type":"join","z":"8e87b3aa.a0d61","name":"join","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":":","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":370,"y":80,"wires":[["2b2cee21.896a82"]]},{"id":"c6164841.101a08","type":"inject","z":"8e87b3aa.a0d61","name":"simulate 2","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"hour","payload":"2","payloadType":"str","x":170,"y":60,"wires":[["70dac812.ce7c48"]]},{"id":"477ac6fa.af702","type":"inject","z":"8e87b3aa.a0d61","name":"simulate 22","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"minute","payload":"22","payloadType":"str","x":190,"y":120,"wires":[["70dac812.ce7c48"]]},{"id":"2b2cee21.896a82","type":"change","z":"8e87b3aa.a0d61","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.hour &\":\"&payload.minute","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":80,"wires":[["7e0f28d1.e4048"]]},{"id":"7e0f28d1.e4048","type":"debug","z":"8e87b3aa.a0d61","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":700,"y":160,"wires":[]}]

Hi @E1cid

Thanks for you fast reply.

Just try your example and that work ok with that simulate buttons. But when i try to use my input sliders that not working.

[{"id":"bfff0ca.6ef8bf","type":"tab","label":"Autolämmitys","disabled":false,"info":""},{"id":"1eca59d3.b71666","type":"server-state-changed","z":"bfff0ca.6ef8bf","name":"Slider hour","server":"64727c95.4148c4","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.auto_ajastin_hour","entityidfiltertype":"exact","outputinitially":true,"state_type":"num","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":120,"y":60,"wires":[["292ce9f2.c2e516","4cc092e0.2ea8dc"]]},{"id":"d117955c.61b0f8","type":"server-state-changed","z":"bfff0ca.6ef8bf","name":"Slider min","server":"64727c95.4148c4","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.auto_ajastin_min","entityidfiltertype":"exact","outputinitially":true,"state_type":"num","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":120,"y":120,"wires":[["292ce9f2.c2e516","4cc092e0.2ea8dc"]]},{"id":"292ce9f2.c2e516","type":"join","z":"bfff0ca.6ef8bf","name":"join","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":":","joinerType":"str","accumulate":false,"timeout":"22","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":350,"y":60,"wires":[["f897c486.0b92a8"]]},{"id":"b1cb264b.883548","type":"eztimer","z":"bfff0ca.6ef8bf","name":"Test ez timer","debug":false,"autoname":"17:00 - 11:00:00","tag":"eztimer","topic":"","suspended":false,"sendEventsOnSuspend":false,"latLongSource":"haZone","latLongHaZone":"zone.home","lat":"60.2159","lon":"24.8961","timerType":"1","startupMessage":true,"ontype":"2","ontimesun":"dawn","ontimetod":"17:00","onpropertytype":"msg","onproperty":"payload","onvaluetype":"num","onvalue":1,"onoffset":0,"onrandomoffset":0,"onsuppressrepeats":false,"offtype":"2","offtimesun":"dusk","offtimetod":"11:00:00","offduration":"00:01:00","offpropertytype":"msg","offproperty":"payload","offvaluetype":"num","offvalue":0,"offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"resend":false,"resendInterval":"0s","mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":790,"y":60,"wires":[[]]},{"id":"f897c486.0b92a8","type":"change","z":"bfff0ca.6ef8bf","name":"payload to payload.ontime","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.ontime","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":60,"wires":[["b1cb264b.883548"]]},{"id":"4cc092e0.2ea8dc","type":"join","z":"bfff0ca.6ef8bf","name":"join","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":":","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":530,"y":200,"wires":[["ec3ecf59.94629"]]},{"id":"3c0f8193.b0225e","type":"inject","z":"bfff0ca.6ef8bf","name":"simulate 2","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"hour","payload":"2","payloadType":"str","x":200,"y":220,"wires":[["4cc092e0.2ea8dc"]]},{"id":"7cf13e18.ff393","type":"inject","z":"bfff0ca.6ef8bf","name":"simulate 22","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"minute","payload":"22","payloadType":"str","x":210,"y":280,"wires":[["4cc092e0.2ea8dc"]]},{"id":"ec3ecf59.94629","type":"change","z":"bfff0ca.6ef8bf","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.hour &\":\"&payload.minute","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":730,"y":200,"wires":[["8939a234.62fcb"]]},{"id":"8939a234.62fcb","type":"debug","z":"bfff0ca.6ef8bf","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":860,"y":280,"wires":[]},{"id":"64727c95.4148c4","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]`Preformatted text`

My nodered is working Hass io and be add-on that Hass io (home assistant). Dont know exact version number what hass io right now using. Here i think you see version number: Home Assistant Community Add-on: Node-RED - Home Assistant OS - Home Assistant Community

My sliders look this, and if debug that sliders i get this kind of message:
image

you need to set topic in sliders to "hour" and "minute".

Dont find place to do that. Here my other slider settings page:

then do it directly after edit event node with a change node, set msg.topic to string "hour".

Many thanks. Now that works perfectly. I think thats too easy questions you guys here :smiley:

Here flow what works ok now :slight_smile:

[{"id":"1eca59d3.b71666","type":"server-state-changed","z":"bfff0ca.6ef8bf","name":"Slider hour","server":"64727c95.4148c4","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.auto_ajastin_hour","entityidfiltertype":"exact","outputinitially":true,"state_type":"num","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":80,"y":60,"wires":[["7c859a98.9778e4"]]},{"id":"d117955c.61b0f8","type":"server-state-changed","z":"bfff0ca.6ef8bf","name":"Slider min","server":"64727c95.4148c4","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.auto_ajastin_min","entityidfiltertype":"exact","outputinitially":true,"state_type":"num","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":80,"y":140,"wires":[["fb62f6aa.5576d8"]]},{"id":"b1cb264b.883548","type":"eztimer","z":"bfff0ca.6ef8bf","name":"Test ez timer","debug":false,"autoname":"17:00 - 11:00:00","tag":"eztimer","topic":"","suspended":false,"sendEventsOnSuspend":false,"latLongSource":"haZone","latLongHaZone":"zone.home","lat":"60.2159","lon":"24.8961","timerType":"1","startupMessage":true,"ontype":"2","ontimesun":"dawn","ontimetod":"17:00","onpropertytype":"msg","onproperty":"payload","onvaluetype":"num","onvalue":1,"onoffset":0,"onrandomoffset":0,"onsuppressrepeats":false,"offtype":"2","offtimesun":"dusk","offtimetod":"11:00:00","offduration":"00:01:00","offpropertytype":"msg","offproperty":"payload","offvaluetype":"num","offvalue":0,"offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"resend":false,"resendInterval":"0s","mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":1030,"y":100,"wires":[[]]},{"id":"4cc092e0.2ea8dc","type":"join","z":"bfff0ca.6ef8bf","name":"join","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":":","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":510,"y":100,"wires":[["ec3ecf59.94629"]]},{"id":"ec3ecf59.94629","type":"change","z":"bfff0ca.6ef8bf","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.hour &\":\"&payload.minute","tot":"jsonata"},{"t":"move","p":"payload","pt":"msg","to":"payload.ontime","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":100,"wires":[["b1cb264b.883548","8939a234.62fcb"]]},{"id":"8939a234.62fcb","type":"debug","z":"bfff0ca.6ef8bf","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1030,"y":180,"wires":[]},{"id":"fb62f6aa.5576d8","type":"change","z":"bfff0ca.6ef8bf","name":"Change topic \"minute\"","rules":[{"t":"set","p":"topic","pt":"msg","to":"minute","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":300,"y":140,"wires":[["4cc092e0.2ea8dc"]]},{"id":"7c859a98.9778e4","type":"change","z":"bfff0ca.6ef8bf","name":"Change topic \"hour\"","rules":[{"t":"set","p":"topic","pt":"msg","to":"hour","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":300,"y":60,"wires":[["4cc092e0.2ea8dc"]]},{"id":"e2732a8a.617fa8","type":"inject","z":"bfff0ca.6ef8bf","name":"off","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"off","payloadType":"str","x":850,"y":40,"wires":[["b1cb264b.883548"]]},{"id":"64727c95.4148c4","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.