ESPHome Wifi Traffic

Hi there,

i have a sensor that is configured to do a reading every 100ms. Will the node also send updates to Homeassistant every 100ms or will it only send messages if the value changes?

Yes it will. Use the throttle filter ORed with the delta filter. That way you get a sensible update rate from the throttle filter but an instant update if the value changes from the delta filter.

Great!

Filters are the to go here. The sensor is a time of flight distance sensor and if the distance is above a meter or so the value is nan. I had to convert that to a number and than use the delta filter with a delta of 0.1

I ended up using that:

sensor:
  - platform: vl53l0x
    name: "${friendly_name} Entfernung"
    address: 0x29
    update_interval: 100ms
    long_range: True
    filters:
      - lambda: |-
          if ( isnan(x) ) 
            return 0;
          else
            return x;
      - delta: 0.1

The sensor is glued to the wall and if my home cinema screen comes down and reaches the sensed height the tof will fire and trigger an automation to stop the screens motor.

I get some false positives when the screen is down. I think its because the sensed area is not a straight cylinder, rather a cone that changes its diameter slightly.

Thanks for your help, happy now :smile:

1 Like