Stop local pushing data for a period of time?

Is it possible to stop data being pushed to HA from an ESP device during curtain hours.

In other word, I have a power adaptor that is only on curtain times during the day, but overnight when the device is off It would be nice to prevent data like the current (A) (albeit very low measurements) being pushed to HA.

I do have the time: platform: homeassistant set up on the esp device.

Why? It doesn’t matter does it?

Since you have time: set up, then it does not make sense to prevent the push.
You will already be connected to WiFi and have a connection made to HA, so the extra data being sent is nothing.

Well, if it is OFF it should have actually current of 0 A beside a Power of 0W. If you using the native api the values will be only be pushed when the states actually change :man_shrugging:

Maybe calibrate your power meter component so it doesn’t show ghost values?

You could probably achieve something easily with deep sleep :zzz:

I’m assuming that the current measuring sensor is on the power input side on the adaptor, in other words before the relay, so although the relay is off its measuring the current to keep the device alive, although spiking as high as 40mA, 50mA in one place seems quite high to me for standby current so may be some noise as well.

I don’t need to see this or collect this data overnight, I’m only interested in the current during the day.
Its updates ever 2 seconds because I need an accurate current footprint over the day of the appliance when its working.

I only push the current and the total_daily_energy from the adaptor.

If I’m right regarding the positioning of the current sensor being on the power input in the device, I don’t think calibrating would work, I suppose I could set a filter saying anything below 100mA set to 0 or ignore.

Here is a graph taken over last night:

And a sample of just 30 minutes

Yes, that would be an easy solution.
Something like this:

  - lambda: !lambda |-
      if (x < 100) return 0;
      return x;
1 Like