To anyone who can help,
I’ve recently started using node red in HA to try automate a few processes in my home. I’ve created a sleep timer for my ducted heating/cooling system that turns the A/C off after a certain period of time.
I’m using a time helper to select the duration of the sleep timer & an input boolean to start the automation. It uses a state node to check what state the A/C is in & if it’s on (heat/cool/fan etc) that the timer helper outputs the value selected. This payload is converted to a delay, which then activates a trigger node (delay node can be used interchangably here). The trigger then turns off the A/C & resets the input boolean.
What I’m after is a way to visually see the time remaining on the delay prior to triggering shutdown of the A/C. I’ve played around with timer/counter nodes, but can’t get it to work. Here’s how the current setup appears in Lovelace.
And here’s my node red flow. Any help would be much appreciated!!
[{"id":"1bd824deebac1848","type":"api-call-service","z":"0d4fa5a32083bb91","name":"A/C Shutdown","server":"5085ef33.d0a66","version":3,"debugenabled":false,"service_domain":"climate","service":"turn_off","entityId":"climate.a_c","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":440,"y":660,"wires":[[]]},{"id":"e3118fa5653650dc","type":"function","z":"0d4fa5a32083bb91","name":"Change ms to s","func":"msg.delay = msg.delay * 60000;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":440,"y":540,"wires":[["5088c235e9655164"]]},{"id":"870d691cf360e831","type":"change","z":"0d4fa5a32083bb91","name":"Change Payload To Delay","rules":[{"t":"move","p":"payload","pt":"msg","to":"delay","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":480,"wires":[["e3118fa5653650dc"]]},{"id":"bd19b045351642df","type":"api-current-state","z":"0d4fa5a32083bb91","name":"Time Until Shutdown","server":"5085ef33.d0a66","version":3,"outputs":2,"halt_if":"120","halt_if_type":"num","halt_if_compare":"lte","entity_id":"input_number.time","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"for":0,"forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":460,"y":420,"wires":[["870d691cf360e831"],[]]},{"id":"b34e091586a2b3a4","type":"api-current-state","z":"0d4fa5a32083bb91","name":"A/C Status","server":"5085ef33.d0a66","version":3,"outputs":2,"halt_if":"cool","halt_if_type":"str","halt_if_compare":"is","entity_id":"climate.a_c","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"500","forType":"num","forUnits":"milliseconds","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":430,"y":120,"wires":[["bd19b045351642df"],[]]},{"id":"b97733f0afc936bb","type":"server-state-changed","z":"0d4fa5a32083bb91","name":"A/C Sleep Timer","server":"5085ef33.d0a66","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.ac_sleep_timer","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":"500","forType":"num","forUnits":"milliseconds","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":440,"y":40,"wires":[["b34e091586a2b3a4","1b9df89c5627677b","9caafc4810bf936c","f04555d5a42ddbea","ba6a09d3d85f8e5b"],["de6ecbbf6f8ce482"]]},{"id":"de6ecbbf6f8ce482","type":"change","z":"0d4fa5a32083bb91","name":"Reset A/C Shutdown Delay","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":180,"y":600,"wires":[["5088c235e9655164"]]},{"id":"5088c235e9655164","type":"trigger","z":"0d4fa5a32083bb91","name":"A/C Shutdown Trigger","op1":"","op2":"","op1type":"nul","op2type":"pay","duration":"1","extend":false,"overrideDelay":true,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":460,"y":600,"wires":[["1bd824deebac1848","728c2d48901329c1"]]},{"id":"1b9df89c5627677b","type":"api-current-state","z":"0d4fa5a32083bb91","name":"A/C Status","server":"5085ef33.d0a66","version":3,"outputs":2,"halt_if":"heat","halt_if_type":"str","halt_if_compare":"is","entity_id":"climate.a_c","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"500","forType":"num","forUnits":"milliseconds","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":430,"y":180,"wires":[["bd19b045351642df"],[]]},{"id":"9caafc4810bf936c","type":"api-current-state","z":"0d4fa5a32083bb91","name":"A/C Status","server":"5085ef33.d0a66","version":3,"outputs":2,"halt_if":"heat_cool","halt_if_type":"str","halt_if_compare":"is","entity_id":"climate.a_c","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"500","forType":"num","forUnits":"milliseconds","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":430,"y":240,"wires":[["bd19b045351642df"],[]]},{"id":"f04555d5a42ddbea","type":"api-current-state","z":"0d4fa5a32083bb91","name":"A/C Status","server":"5085ef33.d0a66","version":3,"outputs":2,"halt_if":"dry","halt_if_type":"str","halt_if_compare":"is","entity_id":"climate.a_c","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"500","forType":"num","forUnits":"milliseconds","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":430,"y":300,"wires":[["bd19b045351642df"],[]]},{"id":"ba6a09d3d85f8e5b","type":"api-current-state","z":"0d4fa5a32083bb91","name":"A/C Status","server":"5085ef33.d0a66","version":3,"outputs":2,"halt_if":"fan_only","halt_if_type":"str","halt_if_compare":"is","entity_id":"climate.a_c","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"500","forType":"num","forUnits":"milliseconds","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":430,"y":360,"wires":[["bd19b045351642df"],[]]},{"id":"728c2d48901329c1","type":"api-call-service","z":"0d4fa5a32083bb91","name":"A/C Sleep Timer","server":"5085ef33.d0a66","version":3,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.ac_sleep_timer","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":440,"y":720,"wires":[[]]},{"id":"5085ef33.d0a66","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]