Irrigation to show remaining time in Lovelace from dynamic timer using NodeRed

Hi .
I am about to implement the Irrigation via Nodered. The “Tristans Smartes Heim”. And the video massively helped me in achieving that.
Tristan Rasenbewässerung
What I want to know is how I can display the remaining time in Home Assistant. Do I add another helper? Which helper would that be.?
I created to helpers called: timer.rasen and timer.tropf But as of now they are static. What they should is taking the value of:
input_number.dauer_tropfbewasserung and insert is there as the start of that timer.
Here is my flow so far:

[{"id":"fbf5156d607c2944","type":"server-state-changed","z":"c753663a45a2236f","name":"Tropfbewässerung Terasse einschalten","server":"92183824.74a3e8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"switch.rasen_esp8266_tropf_terrasse_2","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"on","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":190,"y":1480,"wires":[["3d556e992d8d4785","b38488054ab473fd"],[]]},{"id":"3d556e992d8d4785","type":"api-current-state","z":"c753663a45a2236f","name":"Konfigurierte Dauer Tropfbewässerung","server":"92183824.74a3e8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_number.dauer_tropfbewasserung","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":350,"y":1560,"wires":[["c8b19522b2dd18b7"]]},{"id":"c8b19522b2dd18b7","type":"change","z":"c753663a45a2236f","name":"Minuten in Millisekunden","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload*60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":190,"y":1620,"wires":[["93701b06d797ef6a"]]},{"id":"93701b06d797ef6a","type":"delay","z":"c753663a45a2236f","name":"Eingegebene Dauer","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":440,"y":1640,"wires":[["26e04bd184399fdf","d26eee9d5caa6662"]]},{"id":"26e04bd184399fdf","type":"api-call-service","z":"c753663a45a2236f","name":"Tropfbewässerung Terasse aus","server":"92183824.74a3e8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.rasen_esp8266_tropf_terrasse_2"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":1740,"wires":[["5ebb74f0d2c386f1"]]},{"id":"92183824.74a3e8","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":true,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","statusSeparator":"","enableGlobalContextStore":false}]

Maybe it is even possible to do something lie it is shown as the status of our washing mashine:

I hope you guys understand what I am hoping for.
Thanks
Sascha

I havent used the timer integration yet. This is the way I create a count down timer in NR. Time to count from is set in millisecond under msg.reset sent to the counter node. The inject repeats every second to count the seconds down. I send the value into a sensor node and use that sensor to display it on the desktop.

[{"id":"90670e0dd835a764","type":"inject","z":"0a325c35fc29f44e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":230,"y":4800,"wires":[[]]},{"id":"fa572f72688f80ce","type":"counter","z":"0a325c35fc29f44e","name":"","init":"0","step":"1000","lower":"","upper":"","mode":"decrement","outputs":"1","x":460,"y":4800,"wires":[["f742f729d6421415"]]},{"id":"1e43fdeeb0fb89e0","type":"inject","z":"0a325c35fc29f44e","name":"send time ms msg.reset","props":[{"p":"reset","v":"20000","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":240,"y":4700,"wires":[["fa572f72688f80ce"]]},{"id":"550853e991bd6c20","type":"debug","z":"0a325c35fc29f44e","name":"debug 188","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":910,"y":4800,"wires":[]},{"id":"f742f729d6421415","type":"moment","z":"0a325c35fc29f44e","name":"","topic":"","input":"count","inputType":"msg","inTz":"America/New_York","adjAmount":0,"adjType":"days","adjDir":"add","format":"h:mm:ss","locale":"C","output":"payload","outputType":"msg","outTz":"America/New_York","x":690,"y":4800,"wires":[["550853e991bd6c20"]]}]

Thanks for the answer, but I think it is not what I am looking for. I set the duration with my input_number.dauer_tropfbewasserung. When I start the Automation, it shall start at the set time and then countdown per minute all the way down to zero. Maybe it would even show the time when it is estimated to finish (Time started + input_number.dauer_tropfbewasserung. which should be a fixed number.
Which node do I use when I want to sen a value from Nodered to HA?

Use a sensor node setting the state to time started + input number converted to a date time string.

Then in lovelace use GitHub - rianadon/timer-bar-card: A progress bar display for Home Assistant timers

edit:

You can do it without the sensor node using the input_number and switch as options in the timer bar card

1 Like