Create a state based on the produced power value. This is the cumulative value for all dSMs set to "measure energy production".

By using the production value, the state can be set and reset depending on the current power produced as measured by all the dSMs.

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 5000W. 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.

The UDS can then be used to trigger an action, such as turning on a specific electric consumer, such as charging your E-car or turning on your water heater.