Nodered timer data through put to HA dashboard

Hi all,

I need some help with getting information from a timer in Node Red back onto my HA dashboard.

Any suggestions or help would be much appreciated. I will be adding my flow in the comments if someone wants to look into it more.
NodeRed Timer

[{"id":"7ee30a0a.303864","type":"switch","z":"c461f683.ee9f78","name":"Temp","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"14","vt":"str"},{"t":"btwn","v":"14.1","vt":"num","v2":"24.9","v2t":"num"},{"t":"gte","v":"25","vt":"num"}],"checkall":"false","repair":false,"outputs":3,"x":610,"y":140,"wires":[["3e07cbd.fdc9f34"],["6b0855fe.f211dc"],["fd97075c.596e08"]]},{"id":"1ad23bf9.022674","type":"api-current-state","z":"c461f683.ee9f78","name":"Temp","server":"5513f54d.b4427c","version":1,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"lte","override_topic":false,"entity_id":"sensor.outdoor_temperature","state_type":"num","state_location":"payload","override_payload":"msg","entity_location":"","override_data":"none","blockInputOverrides":false,"x":470,"y":160,"wires":[["7ee30a0a.303864"]]},{"id":"3e07cbd.fdc9f34","type":"template","z":"c461f683.ee9f78","name":"Heat","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{\"Vendor\":\"COOLIX\",\"Model\":-1,\"Mode\":\"Heat\",\"Power\":\"On\",\"Celsius\":\"On\",\"Temp\":26,\"FanSpeed\":\"High\",\"SwingV\":\"Off\",\"Turbo\":\"On\"}","output":"str","x":790,"y":38,"wires":[["290e4e08.79f5c2","6c1a5928.483c78","3b345d692f342686"]]},{"id":"6b0855fe.f211dc","type":"api-call-service","z":"c461f683.ee9f78","name":"Notify Temp","server":"5513f54d.b4427c","version":1,"debugenabled":false,"service_domain":"notify","service":"notify","entityId":"","data":"{\"message\":\"The current Temp is {{entity.sensor.outdoor_temperature}}c and the Air Conditioner has not been turned turned on, Enjoy!!!!\",\"title\":\"Air Conditioning\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"none","mustacheAltTags":false,"x":810,"y":120,"wires":[[]]},{"id":"fd97075c.596e08","type":"template","z":"c461f683.ee9f78","name":"Cool","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{\"Vendor\":\"COOLIX\",\"Model\":-1,\"Mode\":\"Cool\",\"Power\":\"On\",\"Celsius\":\"On\",\"Temp\":22,\"FanSpeed\":\"High\",\"SwingV\":\"Off\",\"Turbo\":\"On\",}","output":"str","x":790,"y":203,"wires":[["2cb0292f.b48c96","290e4e08.79f5c2","3b345d692f342686"]]},{"id":"f3e7d89858964530","type":"api-current-state","z":"c461f683.ee9f78","name":"Aircon On?","server":"5513f54d.b4427c","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.aircon","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":470,"y":100,"wires":[["7e6dc42e09af1f02"],["1ad23bf9.022674"]]},{"id":"290e4e08.79f5c2","type":"mqtt out","z":"c461f683.ee9f78","name":"Kitchen IR","topic":"cmnd/kitchen_ir/irhvac","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"2c4f4e07.0119c2","x":2050,"y":120,"wires":[]},{"id":"6c1a5928.483c78","type":"api-call-service","z":"c461f683.ee9f78","name":"Notify Heat","server":"5513f54d.b4427c","version":1,"debugenabled":false,"service_domain":"notify","service":"notify","entityId":"","data":"{\"message\":\"The current Temp is {{entity.sensor.outdoor_temperature}}c and the Air Conditioning has been turned on to 24c Heat for {{entity.input_number.aircon_timer}} Minutes, Enjoy!!!!\",\"title\":\"Air Conditioning\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"none","mustacheAltTags":false,"x":1030,"y":38,"wires":[[]]},{"id":"3b345d692f342686","type":"api-current-state","z":"c461f683.ee9f78","name":"Aircon Timer","server":"5513f54d.b4427c","version":1,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","override_topic":false,"entity_id":"input_number.aircon_timer","state_type":"num","state_location":"payload","override_payload":"msg","entity_location":"entity_id","override_data":"msg","blockInputOverrides":false,"x":1010,"y":120,"wires":[["77160aa6b5c65592"]]},{"id":"2cb0292f.b48c96","type":"api-call-service","z":"c461f683.ee9f78","name":"Notify Cool","server":"5513f54d.b4427c","version":1,"debugenabled":false,"service_domain":"notify","service":"notify","entityId":"","data":"{\"message\":\"The current Temp is {{entity.sensor.outdoor_temperature}}c and the Air Conditioning has been turned on to 22c Cool for {{entity.input_number.aircon_timer}} Minutes, Enjoy!!!!\",\"title\":\"Air Conditioning\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"none","mustacheAltTags":false,"x":1030,"y":220,"wires":[[]]},{"id":"4e4a9277fb2829d1","type":"function","z":"c461f683.ee9f78","name":"now?","func":"const now = new Date();\nconst hours = now.getHours().toString().padStart(2,'0');\nconst minutes = now.getMinutes().toString().padStart(2,'0');\nconst time = `${hours}:${minutes}`;\n// Remove seconds\nconst alarm = msg.payload.split(\":\").splice(0,2).join(\":\");\n\nif(time === alarm) {\n    return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":470,"y":40,"wires":[["f3e7d89858964530"]]},{"id":"7e6dc42e09af1f02","type":"api-call-service","z":"c461f683.ee9f78","name":"Notify","server":"5513f54d.b4427c","version":1,"debugenabled":true,"service_domain":"notify","service":"notify","entityId":"","data":"{\"message\":\"The current Temp is {{entity.sensor.outdoor_temperature}}c and the Air Conditionor was already switched on, Enjoy!!!!\",\"title\":\"Air Conditioning\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":650,"y":40,"wires":[[]]},{"id":"4c807678.7ed158","type":"template","z":"c461f683.ee9f78","name":"Off","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{\"Vendor\":\"COOLIX\",\"Model\":-1,\"Mode\":\"Off\",\"Power\":\"Off\"}","output":"str","x":1590,"y":120,"wires":[["d7dab394.8d7d6","290e4e08.79f5c2"]]},{"id":"092396151e3c726d","type":"api-current-state","z":"c461f683.ee9f78","name":"Aircon Timer","server":"5513f54d.b4427c","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.aircon","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"entity_id","override_data":"msg","blockInputOverrides":false,"x":810,"y":280,"wires":[["3b345d692f342686"],[]]},{"id":"7ff849ab144bc982","type":"server-state-changed","z":"c461f683.ee9f78","name":"Pause Timer?","server":"5513f54d.b4427c","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.aircon_timer_pause","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":1010,"y":280,"wires":[["6c5872271199987b"],["3b345d692f342686"]]},{"id":"77160aa6b5c65592","type":"function","z":"c461f683.ee9f78","name":"check time","func":"var remain = flow.get(\"AirConTime\");\nvar timer = msg.payload * 60;\n\n    if  (remain > 0){\n    msg.payload = {\"timeout\": remain, \"warning\": 10}; \n    return [msg];\n    }\n    \n    else {\n    msg.payload = {\"timeout\": timer, \"warning\": 10}; \n    return [msg];\n    }\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1250,"y":100,"wires":[["f09d6eb0f757337d"]]},{"id":"9c4bd1dc955d841d","type":"api-current-state","z":"c461f683.ee9f78","name":"Workday","server":"5513f54d.b4427c","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_datetime.aircon_morning_weekday","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"","override_data":"none","blockInputOverrides":false,"x":280,"y":40,"wires":[["4e4a9277fb2829d1"]]},{"id":"c18557fa23dca78b","type":"api-current-state","z":"c461f683.ee9f78","name":"Weekend","server":"5513f54d.b4427c","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_datetime.aircon_morning_weekend","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"","override_data":"none","blockInputOverrides":false,"x":280,"y":200,"wires":[["4e4a9277fb2829d1"]]},{"id":"66acbf033a0b091d","type":"api-current-state","z":"c461f683.ee9f78","name":"Afternoon","server":"5513f54d.b4427c","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_datetime.aircon_afternoon","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"","override_data":"none","blockInputOverrides":false,"x":300,"y":120,"wires":[["4e4a9277fb2829d1"]]},{"id":"944ffe2354c161e8","type":"switch","z":"c461f683.ee9f78","name":"Stop anything that's not \"off\"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1500,"y":240,"wires":[["4c807678.7ed158"]]},{"id":"d7dab394.8d7d6","type":"api-call-service","z":"c461f683.ee9f78","name":"Notify Off","server":"5513f54d.b4427c","version":1,"debugenabled":false,"service_domain":"notify","service":"notify","entityId":"","data":"{\"message\":\"The current Temp is {{entity.sensor.outdoor_temperature}}c and the Air Conditioning has been turned off, Enjoy!!!!\",\"title\":\"Air Conditioning\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"none","mustacheAltTags":false,"x":1760,"y":120,"wires":[[]]},{"id":"53621bd50b1148b3","type":"server-state-changed","z":"c461f683.ee9f78","name":"Aircon Timer","server":"5513f54d.b4427c","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.aircon_timer","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":610,"y":280,"wires":[["092396151e3c726d"]]},{"id":"6c5872271199987b","type":"function","z":"c461f683.ee9f78","name":"stop","func":"msg.payload=(\"stop\")\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1230,"y":160,"wires":[["f09d6eb0f757337d"]]},{"id":"f09d6eb0f757337d","type":"mytimeout","z":"c461f683.ee9f78","name":"Countdown","outtopic":"","outsafe":"","outwarning":"warning","outunsafe":"off","warning":"0","timer":"0","debug":false,"ndebug":false,"ignoreCase":false,"repeat":false,"again":false,"x":1430,"y":120,"wires":[["944ffe2354c161e8"],[]]},{"id":"60a4c3df68817803","type":"api-current-state","z":"c461f683.ee9f78","name":"Workday","server":"5513f54d.b4427c","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.workday_sensor","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"","override_data":"none","blockInputOverrides":false,"x":100,"y":200,"wires":[["9c4bd1dc955d841d","66acbf033a0b091d"],["c18557fa23dca78b","66acbf033a0b091d"]]},{"id":"7f5b22bfbcaa4e99","type":"ha-wait-until","z":"c461f683.ee9f78","name":"Wait holiday Off","server":"5513f54d.b4427c","outputs":1,"entityId":"input_boolean.holiday","entityIdFilterType":"exact","property":"state","comparator":"is","value":"off","valueType":"str","timeout":0,"timeoutType":"num","timeoutUnits":"seconds","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":120,"y":120,"wires":[["60a4c3df68817803"]]},{"id":"3864c983d9417828","type":"server-state-changed","z":"c461f683.ee9f78","name":"Time","server":"5513f54d.b4427c","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.time","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":90,"y":40,"wires":[["7f5b22bfbcaa4e99"]]},{"id":"5513f54d.b4427c","type":"server","name":"Home Assistant","legacy":true,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"2c4f4e07.0119c2","type":"mqtt-broker","name":"MQTT","broker":"192.168.1.30","port":"1883","clientid":"","usetls":false,"compatmode":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"var inputstr = \"\"\"\" inputstr = msg.payload.slice(6); msg.payload = inputstr; return msg;","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""}]

Hey Wally when you post your code like that it makes it hard to copy.

I dont use that countdown node but this is how I set a countdown entity. I am already using an input_number to set my timer that I want to see countdown on my dash.

[{"id":"be21a6ee47e504b5","type":"inject","z":"93bee8c2cc0f11ba","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"$globalContext('homeAssistant.states.input_number.grow_pump_interval')","payloadType":"jsonata","x":870,"y":580,"wires":[["535a35ac2a6c6cc0"]]},{"id":"403f631cfd1dbc01","type":"moment","z":"93bee8c2cc0f11ba","name":"","topic":"","input":"count","inputType":"msg","inTz":"America/New_York","adjAmount":0,"adjType":"days","adjDir":"add","format":"m:ss","locale":"en","output":"payload","outputType":"msg","outTz":"America/New_York","x":1540,"y":620,"wires":[["fdfc202ab6aefba4"]]},{"id":"fdfc202ab6aefba4","type":"ha-entity","z":"93bee8c2cc0f11ba","name":"last interval","server":"","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"last_interval"},{"property":"device_class","value":"time"},{"property":"icon","value":"mdi:clock"},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"block","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":1750,"y":620,"wires":[[]]},{"id":"ae57b32c265f2cc6","type":"counter","z":"93bee8c2cc0f11ba","name":"","init":"0","step":"1000","lower":"","upper":"","mode":"decrement","outputs":"1","x":1320,"y":620,"wires":[["403f631cfd1dbc01"]]},{"id":"535a35ac2a6c6cc0","type":"change","z":"93bee8c2cc0f11ba","name":"","rules":[{"t":"set","p":"x","pt":"msg","to":"homeassistant.homeAssistant.states[\"input_number.loop_interval\"].state","tot":"global"},{"t":"set","p":"x","pt":"msg","to":"($number(msg.x))*60000","tot":"jsonata"},{"t":"move","p":"x","pt":"msg","to":"reset","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1100,"y":620,"wires":[["ae57b32c265f2cc6"]]},{"id":"6c4555996ff3bedd","type":"inject","z":"93bee8c2cc0f11ba","name":"","props":[{"p":"payload"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":1130,"y":680,"wires":[["ae57b32c265f2cc6"]]},{"id":"988e7ab349807887","type":"server-state-changed","z":"93bee8c2cc0f11ba","name":"","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.gtc_switch_01","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[],"x":770,"y":640,"wires":[["535a35ac2a6c6cc0"],[]]}]

It watches a switch that is turned on by a timer. When the switch turns on, it sets the counter to whatever the input_number in the change node is. Converts the input_number seconds to milliseconds then formatted to minutes and second to an entity node.

image

Thanks, I have updated my post.
I have tried your setup and it doesn’t seem to work for me, I will keep playing around with it when I get the time