Suppress traces if automation conditions not met

I have an automation with trigger to run every 30s. (it measures solar export and adjusts EV charging rate accordingly). It has 2 conditions - 1) that the car charger is plugged in and 2) that the new charge rate is different from the current charge rate.

I am only interested in the traces when the conditions are met, and want to suppress the others. I know you can increase the trace count, but setting some arbitrarily high value when the automation triggers nearly 3k times per day seems wrong. I also thought about having 1 automation run every 30s and toggle some object if conditions are met and use that as the trigger for my actual automation, but that seems clunky. Logbook.log is an option but I havent played with that.

Ideal scenario would be a setting that allows you to suppress traces unless the conditions are met (feature request?) Can anyone suggest a good solution in this case?

The simple solution is to not trigger every 30 seconds. Time pattern triggers are almost always a kludge.

Remove the time pattern trigger and instead use matching triggers and conditions:

Triggers:

  • state trigger for the car charger changing to “plugged in”
  • state trigger for the charge rate changing

Conditions:

  • keep the same 2 conditions you already have

I don’t think you’re going to find a way to suppress it

Agreed if it’s triggering that much, what has to be adjusted? And does it need to happen that rapidly? I often find people misunderstanding how HA does things and setting recurring time triggers simply because they don’t know how to use event triggers to do the same thing but only when needed (if most of your runs are - I rand but didn’t actually do anything. This is probably the case.)

Wouldn’t it be easier when the trigger is the new charge rate is different from the current charge rate
and the condition the car charger is plugged in

or even better, a template trigger that combines the two into one trigger :wink: