Send signal to HA only when value below 85cm to avoid congestion

I have a

  • platform: vl53l0x
    name: “Distance Bot”
    update_interval: 0.15s
    #signal_rate_limit: 0.2

I have sometimes timeouts because the network gets congested. I only need to send the value to HA when it is below 85cm (somone crosses it)

How can i do that?
I was thinking to do it somhow with filters or smthing… but lack the knowledge.

Pls help :slight_smile:

Here is the solution:

switch:
  - platform: template
    name: Motion Bottom
    id: motion_bot
    optimistic: true 
    icon: "mdi:stairs-up"
    
  - platform: restart
    name: "Stair Bottom Sensor Restart" 
  
    
sensor:
    
  - platform: vl53l0x
    name: "Distance Bot"
    update_interval: 0.1s 
    internal: true
    on_value_range:
      below: 0.85
      then:
        - switch.template.publish:
            id: motion_bot
            state: ON
1 Like