Help to override automation

I have a Node Red automation that checks nightly at 11:00 pm, to see if windows are closed. If one or more are not, a notification is sent. I would like to create a manual virtual “button” in the frontend that would override the automation until this button was switched back off. Any ideas on the best approach to this?

I’ve done something similar using a ‘switch’ in HA, which I can then use the state of in automations, eg.

switch:
  - platform: command_line
    switches:
      privacy:
        command_on: '/bin/bash -c "/scripts/settingOn.sh /scripts/conf/privacy.conf"'
        command_off: '/bin/bash -c "/scripts/settingOff.sh /scripts/conf/privacy.conf"'
        command_state: '/bin/bash -c "/scripts/toggleState.sh /scripts/conf/privacy.conf"'

where settingOn.sh is:

#!/bin/bash
# Echo toggle a switch in a file from OFF to ON
echo 1 > $1

settingOff.sh is:

#!/bin/bash
# Echo toggle a switch in a file from ON to OFF
echo 0 > $1

and toggleState.sh is:

#!/bin/bash
# Echo toggle a switch in a file from ON to OFF

# first get the file
if grep -q 1 "$1"; then
  #echo IS ON
  exit 0
else
  #echo WAS OFF - TURNING ON
  exit -1
fi
echo UNKNOWN STATE - ASSUME OFF
exit -1

I purposely store the state of the switch in a file so it’s state is remembered on restart, but also I can use/modify it in other shell scripts, etc.

You could create an input_boolean in Home assistant then in Node-RED check if the input_boolean is on or off and execute the rest of the flow based on it.

Thank you. That did it.