Create a state based on the total produced power value. This is the cumulative value for all dSMs set to "measure energy production" (in the Hardware Tab)

By using the production value, the state can be set and reset depending on the current power produced.

For example, if your home as a photovoltaic system, you can define a state "excess power" to be set if the measured production power is above 2500W. To account for short periods of cloud cover, you can set a duration and minimum threshold which the produced power needs to be below, before resetting the state.

This will allow you to trigger an action when you have excess power available, such as charging your E-car, turning on your water boiler, or switching any other electrical consumer.