Reducing Automation Trigger Frequency - And does it matter

I’ve got an automation for a water heater to turn it on/off depending on my Solar generation.
Currently it has 2 triggers with 2 associated actions

  1. If the solar is exporting > 3000 W to the grid for 1 minute then turn on the HW heater
  2. If the house is using > 0 W from the grid for 1 minute then turn off the HW heater (but only if it is on)

My issue is #2 results in many trigger events, that do nothing, for the transitions when the solar has been exporting but not enough to trigger #1 and then drops to the point I’m importing from the grid again.

Any ideas on how to rewrite this to reduce the number of triggers ? Or am I thinking too much about this and does it really not matter ?

And yes I know getting an Eddie is the right way to fix this problem but currently I’m using what is to hand.

I have no idea what an “Eddie” is but the way I used to approach this is to use the filter integration to apply a low pass filter to my solar generation sensor.

That way my load shedding triggers ignore transients caused by clouds briefly passing in front of the sun.

- platform: filter
  name: LP20 Inverter Power
  entity_id: sensor.grid_power
  - filter: lowpass
    time_constant: 20
    precision: 0

However I have found that I do not need to load shed if I time my hot water heating to come on in the middle of the day and adjust my reverse cycle heat pump temperature slightly based on peak/off-peak tariffs so I no longer use this.