Temporarily pause device

Looking for some help on the best way to implement a solution to a problem I have. I’ve referred to it as “pausing” in the title, but open to other ideas too!

The situation is thus: we have an RV and have limited capacity (Amps) on our electrical system. Without going into too much detail, we have a hybrid inverter that can add about 20 Amps of 110VAC current to whatever we have coming in, up to a combined maximum of 30A (the size of our main breaker). Further, as in a residential setting, we have individual breakers for outlets and certain devices - e.g. microwave.

Some of our devices are what I’ll call “automated” devices - things that will periodically cycle on a high load, such as an electric water heater or electric space heater. I have control of these through Home Assistant already.

Our other devices I’ll call “manual” devices - things we explicitly turn on such as an Instant Pot, electric kettle or microwave.

Obviously it’s fairly easy for us to exceed our maximum rated current - either on an individual breaker (e.g. running the electric heater and electric kettle on the same outlet circuit) or the main 30A breaker.

What I’d like to do is automatically pause one or more of the automated devices when the current exceeds some threshold. For example, if I turn on the electric kettle, then the electric water heater should automatically turn off. As long as it turns off within a few seconds, the breaker won’t trip.

I have all the data available - we have an electrical monitoring system already wired into Home Assistant and use Sonoff devices with power metering built in on key devices.

My question is how best to configure this in Home Assistant? I can easily create an automation that will turn a device off when the threshold is exceeded, but how do I return it to its previous state? Maybe the device was off already so it shouldn’t be turned back on afterwards. Conceptually, I imagine it as a composite “AND” switch - i.e. turn the electric water heater on if the switch is on AND there is sufficient power available. Not sure of the best way to set that up.

Hope that makes sense, and I look forward to some ideas!