Resetting a Daily Flow

Hello,

I am new to Node Red and am having an issue with a couple of Home Assistant (core-2021.11.5 & Node Red 10.1.1) automations and hope someone can help me with them.

The first one is controlling an outlet for Christmas lights where it turns on at sunset and turns off at 11PM local time. I redid the flow using a Bigtimer node but think I still have an issue. I have an input boolean for the automation which is either on or off. If it’s on, it should check if it’s after sunset in which it should turn on the outlet and then turn off the lights at 11PM local. I have been able to make I work but the next day, since the input boolean has not changed, the flow does not run since the input boolean event has not changed since the flow last ran. How do I reset the flow so that it runs each day? Here’s the flow for this one:

[{"id":"8a1ad810af4421e2","type":"tab","label":"Outside Christmas Lights","disabled":false,"info":"","env":[]},{"id":"75abe4318e1084a1","type":"api-call-service","z":"8a1ad810af4421e2","name":"Turn On Front Door Outlet","server":"9e5c2d85.48958","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.front_door_outlet","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":790,"y":220,"wires":[[]]},{"id":"44366fe55aa12da2","type":"api-call-service","z":"8a1ad810af4421e2","name":"Turn Off Front Door Outlet","server":"9e5c2d85.48958","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.front_door_outlet","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":790,"y":280,"wires":[[]]},{"id":"3895d0a3.e05bb","type":"bigtimer","z":"8a1ad810af4421e2","outtopic":"","outpayload1":"on","outpayload2":"off","name":"Sunset to 2300","comment":"","lat":"28.4188","lon":"-81.5818","starttime":"5004","endtime":"1380","startoff":0,"endoff":0,"startoff2":"","endoff2":"","offs":"0","outtext1":"on","outtext2":"off","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":"","month7":"","day8":"","month8":"","day9":"","month9":"","day10":"","month10":"","day11":"","month11":"","day12":"","month12":"","d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xday7":"","xmonth7":"","xday8":"","xmonth8":"","xday9":"","xmonth9":"","xday10":"","xmonth10":"","xday11":"","xmonth11":"","xday12":"","xmonth12":"","xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":false,"atstart":true,"odd":false,"even":false,"x":320,"y":220,"wires":[["a8b74b4e.79fbb8"],[],[]]},{"id":"a8b74b4e.79fbb8","type":"switch","z":"8a1ad810af4421e2","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":530,"y":220,"wires":[["75abe4318e1084a1"],["44366fe55aa12da2"]]},{"id":"0569affe1bf28b4b","type":"api-current-state","z":"8a1ad810af4421e2","name":"Christmas Light Automation On?","server":"9e5c2d85.48958","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.christmas_lights_auto","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":230,"y":80,"wires":[["3895d0a3.e05bb"],[]]},{"id":"9e5c2d85.48958","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}]

The second one deals with turning on an LED light in the kitchen from 10PM to sunrise. I tried a different approach on this one and I can get it to turn on each night but it doesn’t turn off at sunrise. I’m sure this is not the most elegant way or even the right way to do it but I want to turn on the kitchen LED strip if the kitchen light is off and it’s after 10PM local time and turn the LED off at sunrise the next day. If the kitchen light is turned on after 10PM local, turn the LED light off which then should be turned back on after the kitchen light is turned off for the hours between 10PM local and sunrise the next day. Here’s that flow.

[{"id":"38ba2ab7bd5fa30b","type":"tab","label":"Kitchen LED Light","disabled":false,"info":"","env":[]},{"id":"69031d2cf2a77670","type":"server-state-changed","z":"38ba2ab7bd5fa30b","name":"Kitchen Light Off","server":"9e5c2d85.48958","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.kitchen","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","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":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":120,"wires":[["9851d1e1c0e59cdf"],[]]},{"id":"9851d1e1c0e59cdf","type":"time-range-switch","z":"38ba2ab7bd5fa30b","name":"10PM to Sunrise","lat":"28.4188","lon":"-81.5818","startTime":"22:00","endTime":"sunrise","startOffset":0,"endOffset":0,"x":370,"y":120,"wires":[["bbb8c148f41b0366"],[]]},{"id":"bbb8c148f41b0366","type":"api-call-service","z":"38ba2ab7bd5fa30b","name":"Turn Kitchen LED Lights On","server":"9e5c2d85.48958","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.kitchen_led_lights","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":620,"y":120,"wires":[["230cf9ea605c5a53"]]},{"id":"477fadcc7a16675c","type":"api-call-service","z":"38ba2ab7bd5fa30b","name":"Turn Kitchen LED Lights Off","server":"9e5c2d85.48958","version":3,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.kitchen_led_lights","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":240,"wires":[[]]},{"id":"ba3b25789a6eaf10","type":"server-state-changed","z":"38ba2ab7bd5fa30b","name":"Kitchen Light On","server":"9e5c2d85.48958","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.kitchen","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":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":340,"wires":[["515cac025cc019b4"],[]]},{"id":"515cac025cc019b4","type":"time-range-switch","z":"38ba2ab7bd5fa30b","name":"10PM to Sunrise","lat":"28.4188","lon":"-81.5818","startTime":"22:00","endTime":"sunrise","startOffset":0,"endOffset":0,"x":370,"y":340,"wires":[["bf11d14f84e07303"],[]]},{"id":"bf11d14f84e07303","type":"api-call-service","z":"38ba2ab7bd5fa30b","name":"Turn Kitchen LED Lights Off","server":"9e5c2d85.48958","version":3,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.kitchen_led_lights","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":620,"y":340,"wires":[[]]},{"id":"230cf9ea605c5a53","type":"ha-wait-until","z":"38ba2ab7bd5fa30b","name":"Wait until Sunrise","server":"9e5c2d85.48958","version":0,"outputs":1,"entityId":"sun.sun","entityIdFilterType":"exact","property":"attributes.rising","comparator":"is","value":"true","valueType":"str","timeout":0,"timeoutType":"num","timeoutUnits":"seconds","entityLocation":"data","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":false,"x":870,"y":120,"wires":[["477fadcc7a16675c"]]},{"id":"9e5c2d85.48958","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}]

Appreciate any help. I’ve read through the bigtimer node and looked through the sites for similar questions but am coming short on how to do this simple automation properly.

Thanks!

Whatever turns of the lights should change the state of the boolean also.
I don’t see what turns off the Christmas lights so I’m I don’t know how to help with that.

Thanks for the response.

The boolean is meant to stay on for the days I want to keep the Christmas lights on, so it’ll probably stay on for 5 weeks. If the boolean is set off when the lights turn off, wouldn’t I need to enable the boolean manually everyday or is there a way to “reset” the boolean instead of setting it back on/off?

It seems to me like the boolean should be the condition and not the trigger in your sequence.

The first one the boolean should interrupt the flow. Stopping the signal from big timer. You would only change the boolean if you wanted to disable the automation, otherwise it will run every day.

You could also get rid of the boolean and just set the dates at the bottom of big timer so that it’s only active during December.

The kitchen, you can use a regular inject node to turn on everyday at 10:00pm, then a sun calc to turn them off.

[{"id":"bbb8c148f41b0366","type":"api-call-service","z":"38ba2ab7bd5fa30b","name":"Turn Kitchen LED Lights On","server":"6b1110b5.183a4","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.kitchen_led_lights","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":620,"y":120,"wires":[[]]},{"id":"bf11d14f84e07303","type":"api-call-service","z":"38ba2ab7bd5fa30b","name":"Turn Kitchen LED Lights Off","server":"6b1110b5.183a4","version":3,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.kitchen_led_lights","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":740,"y":220,"wires":[[]]},{"id":"80981b4a44e14b8b","type":"inject","z":"38ba2ab7bd5fa30b","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 22 * * *","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":320,"y":120,"wires":[["bbb8c148f41b0366"]]},{"id":"14530983989fc1c7","type":"sunrise","z":"38ba2ab7bd5fa30b","name":"","lat":"","lon":"","start":"sunrise","end":"sunset","soff":0,"eoff":0,"x":290,"y":220,"wires":[[],["3ac642582765736e"]]},{"id":"3ac642582765736e","type":"switch","z":"38ba2ab7bd5fa30b","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":490,"y":220,"wires":[["bf11d14f84e07303"],[]]},{"id":"6b1110b5.183a4","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}]

Thanks for the input!

I setup the first one as you suggested but have a question on passing the on/off payload from the bigtimer to the switch through the boolean check node.

Do I need to do anything special with the boolean node to make sure the msg.payload from the bigtimer is passed to he switch node such as changing the msg.payload from the boolean node so the msg.payload from the bigtimer is not lost/changed? I’m new to Node Red and am still trying to figure out the use of messages.

Thanks again!

Just delete the 2 output properties

I always use a change node, so before I am about to go in to another node that will change the payload, I move the payload somewhere else. Eg:

Change (set) msg.bigtimer to msg.payload. Then when you need to access the payload from bigtimer after you have checked the state of the boolean, it will be available in msg.bigtimer

Thanks! That’s what I did but wanted to make sure that would work…

On another note, I’m running into a problem with that particular boolean node where I get the following error when I deploy the flow:

Screenshot 2021-11-30 190929

I read that this is due to the current-state node being triggered before the connection to HA is finished connecting (I have I Use The Home Assistant Add-On and Delay Connection Attempts enabled in Node Red). This is interesting since I have a few other boolean nodes in other flows that do not have this problem. I have deleted the boolean and recreated it and still have the same issue along with restarting Node Red several times. I saw that it is recommended to just deploy the modified flows as opposed to a Full Deploy but am trying to figure out if there’s something else that I’m missing to avoid this error (add a delay?).

Thanks

Thanks for the suggestion! I’ll try that approach on a different flow I’m working on.

I deploy just modified nodes not even whole flows. If everything works as expected I would ignore it. I have 2 tuya bulbs that I get that warning for. They turn on/off as expected for months.

One more question…

I added a new flow for turning on things like the Christmas tree lights and a couple of other items from 0700 to 2300. This all kicks off if there’s anyone at home, so if everyone leaves, the lights turn off but if anyone stays, the lights stay on, and if anyone comes back to an empty house, it’s supposed to turn the lights back on. Here’s the flow:

[{"id":"ce6667d6b3a9bd43","type":"api-call-service","z":"8a1ad810af4421e2","name":"Turn Off Foyer Outlet","server":"9e5c2d85.48958","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.foyer_outlet","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":540,"wires":[[]]},{"id":"f7305b499f2a85d4","type":"api-call-service","z":"8a1ad810af4421e2","name":"Turn Off Entryway Outlet","server":"9e5c2d85.48958","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.entryway_outlet","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":480,"wires":[[]]},{"id":"d8e7b23e3c2213a4","type":"bigtimer","z":"8a1ad810af4421e2","outtopic":"","outpayload1":"on","outpayload2":"off","name":"0700 to 2300","comment":"","lat":"28.4188","lon":"-81.5818","starttime":"420","endtime":"1380","startoff":0,"endoff":0,"startoff2":"","endoff2":"","offs":"0","outtext1":"on_light","outtext2":"off_light","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":"","month7":"","day8":"","month8":"","day9":"","month9":"","day10":"","month10":"","day11":"","month11":"","day12":"","month12":"","d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xday7":"","xmonth7":"","xday8":"","xmonth8":"","xday9":"","xmonth9":"","xday10":"","xmonth10":"","xday11":"","xmonth11":"","xday12":"","xmonth12":"","xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":false,"atstart":true,"odd":false,"even":false,"x":270,"y":340,"wires":[["c7565244a2c1f9f4"],[],[]]},{"id":"c7565244a2c1f9f4","type":"change","z":"8a1ad810af4421e2","name":"msg.bigtimer_inside","rules":[{"t":"set","p":"bigtimer_inside","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":340,"wires":[["3f51e585cb45b1d4","46eafc917d3882fd"]]},{"id":"3f51e585cb45b1d4","type":"api-current-state","z":"8a1ad810af4421e2","name":"Christmas Light Automation On?","server":"9e5c2d85.48958","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.christmas_lights_auto","state_type":"str","blockInputOverrides":false,"outputProperties":[],"override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":390,"y":440,"wires":[["05fda5623f61983f"],[]]},{"id":"8eabb275ed737dc0","type":"api-call-service","z":"8a1ad810af4421e2","name":"Turn Off Living Room Outlet","server":"9e5c2d85.48958","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.living_room_outlet","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":900,"y":600,"wires":[[]]},{"id":"e75f46a5d405dd0c","type":"api-call-service","z":"8a1ad810af4421e2","name":"Turn On Foyer Outlet","server":"9e5c2d85.48958","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.foyer_outlet","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":340,"wires":[[]]},{"id":"7d43eb82442f4d40","type":"api-call-service","z":"8a1ad810af4421e2","name":"Turn On Entryway Outlet","server":"9e5c2d85.48958","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.entryway_outlet","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":280,"wires":[[]]},{"id":"8651467d83594fae","type":"api-call-service","z":"8a1ad810af4421e2","name":"Turn On Living Room Outlet","server":"9e5c2d85.48958","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.living_room_outlet","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":900,"y":400,"wires":[[]]},{"id":"05fda5623f61983f","type":"switch","z":"8a1ad810af4421e2","name":"","property":"bigtimer_inside","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":610,"y":440,"wires":[["7d43eb82442f4d40","e75f46a5d405dd0c","8651467d83594fae"],["f7305b499f2a85d4","ce6667d6b3a9bd43","8eabb275ed737dc0"]]},{"id":"69ec636eb89bdd32","type":"server-state-changed","z":"8a1ad810af4421e2","name":"Anyone Home?","server":"9e5c2d85.48958","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"group.track_people","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"home","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"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":100,"y":500,"wires":[["d8e7b23e3c2213a4"],["f7305b499f2a85d4","ce6667d6b3a9bd43","8eabb275ed737dc0"]]},{"id":"46eafc917d3882fd","type":"debug","z":"8a1ad810af4421e2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"bigtimer_inside","targetType":"msg","statusVal":"","statusType":"auto","x":480,"y":280,"wires":[]},{"id":"9e5c2d85.48958","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"}]

The switches turned on this morning as expected and turned off when we left the house (the Anyone Home? node showed us away), however when we returned, the Anyone Home? node acknowledged that there was someone now at home but the rest of the flow did not fire. Is is because bigtimer only sends the ON command once during those hours so no matter what happens with the Anyone Home? node, it will not fire again until 0700 the next day? I know the bigtimer node can be set to output every minute but I think that would defeat the Anyone Home? node as it’ll just keep turning the lights on. Is it possible to “reset” the bigtimer node when the Anyone Home? node changes state? Also very possible there a better/different solution that I’m missing.

Appreciate any help!

You’ll need to change the message from the anyone home node and then go straight to the check state.

image

Thanks! That worked perfectly.