There are many solutions documented here for “power circuit monitoring” such as this one that I leveraged for my sump pump circuit:
You need a battery operated sensor that will still be able to communicate with the hub if that circuit goes out. The use of a relay will make this work as documented.