# Hello, Two sliders to one payload (clock time)

**URL:** https://discourse.nodered.org/t/hello-two-sliders-to-one-payload-clock-time/40063
**Category:** General
**Created:** [30 January 2021 18:41 UTC](https://discourse.nodered.org/t/hello-two-sliders-to-one-payload-clock-time/40063 "2021-01-30T18:41:05Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![lassiv](https://avatars.discourse-cdn.com/v4/letter/l/4491bb/32.png) [@lassiv](https://discourse.nodered.org/u/lassiv)
#### Post date: [30 January 2021 18:41 UTC](https://discourse.nodered.org/t/hello-two-sliders-to-one-payload-clock-time/40063/1 "2021-01-30T18:41:05Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [30 January 2021 19:04 UTC](https://discourse.nodered.org/t/hello-two-sliders-to-one-payload-clock-time/40063/2 "2021-01-30T19:04:49Z")

</div>

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.

```auto
[{"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":[]}]

```

---

<div class="post-metadata">

### Author: ![lassiv](https://avatars.discourse-cdn.com/v4/letter/l/4491bb/32.png) [@lassiv](https://discourse.nodered.org/u/lassiv)
#### Post date: [30 January 2021 19:19 UTC](https://discourse.nodered.org/t/hello-two-sliders-to-one-payload-clock-time/40063/3 "2021-01-30T19:19:25Z")

</div>

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.

```auto
[{"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](https://community.home-assistant.io/t/home-assistant-community-add-on-node-red/55023)

My sliders look this, and if debug that sliders i get this kind of message:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/4/f4026842f3b0292eedfb6169e5d245d8501df39e.png)

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [30 January 2021 19:20 UTC](https://discourse.nodered.org/t/hello-two-sliders-to-one-payload-clock-time/40063/4 "2021-01-30T19:20:46Z")

</div>

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

---

<div class="post-metadata">

### Author: ![lassiv](https://avatars.discourse-cdn.com/v4/letter/l/4491bb/32.png) [@lassiv](https://discourse.nodered.org/u/lassiv)
#### Post date: [30 January 2021 19:24 UTC](https://discourse.nodered.org/t/hello-two-sliders-to-one-payload-clock-time/40063/5 "2021-01-30T19:24:28Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/b/bbff1648f6d09447cc7aad34888659c4b69816d7.png)

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [30 January 2021 19:26 UTC](https://discourse.nodered.org/t/hello-two-sliders-to-one-payload-clock-time/40063/6 "2021-01-30T19:26:17Z")

</div>

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

---

<div class="post-metadata">

### Author: ![lassiv](https://avatars.discourse-cdn.com/v4/letter/l/4491bb/32.png) [@lassiv](https://discourse.nodered.org/u/lassiv)
#### Post date: [30 January 2021 19:37 UTC](https://discourse.nodered.org/t/hello-two-sliders-to-one-payload-clock-time/40063/7 "2021-01-30T19:37:43Z")

</div>

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

Here flow what works ok now 🙂

```auto
[{"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}]

```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [13 February 2021 19:37 UTC](https://discourse.nodered.org/t/hello-two-sliders-to-one-payload-clock-time/40063/8 "2021-02-13T19:37:54Z")

</div>

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