Binary_sensor don't switch to off before 10 minutes

Hi all

I have several Esphome with this setting:

esphome:
  name: ${esphome_name}
  name_add_mac_suffix: false
#
esp32:
  board: esp32dev
  framework:
    type: arduino
# Définir la log 
logger:
  baud_rate: 0
  level: ${logger_level}
# On limite la log pour l'uart
  logs:
    uart_debug: ERROR
#
# Mise à jour OTA
ota:
# Connexion Wifi
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip:
    static_ip: ${esphome_ip}
    gateway: !secret wifi_gateway
    subnet: !secret wifi_subnet
  fast_connect: on
  ap:
    ssid: "Esp 2410 ${piece}"
    password: !secret ap_password
# Lien avec HA 
api:
  encryption: 
    key: !secret encryption_key
#
captive_portal:
#
# Tracker Ble
esp32_ble_tracker:
  scan_parameters:
    interval: 100ms
    window: 30ms
    active: true

and the binary_sensor

platform: ble_presence
mac_address: ${arnaud_nut}
name: "${piece} Arnaud Nut"
icon: mdi:home
device_class: occupancy

The Ble trackers are Nut, Miband, Amazfit.
When I leave a room (or home) all binary_sensors switch to off in 10 minutes.
Any idea how to improve/decrease this delay ?
What can I checked ?
Thanks for your help

Sounds odd to me.

Is it consistently and exactly 10 minutes? Or does it vary?

Does the ble pass through your walls?

BLE transmitters is just broadcasting packets in intervals without knowing if there is any BLE receivers to catch it.
There is no connection in BLE.

This means your BLE receivers will have to guess when the your BLE transmitters have gone silent.
You can try to lower the time without a new packets received on the BLE receiver to make it update faster, but if you get below the time period the BLE transmitter use, then you will have your sensor jump back and forth all the time, so if you want to really optimize it, then you will need to adjust the transmit interval at the BLE transmitter too.
Since the BLE transmitters are usually battery powered, then this high frequency in updates might have a severe impact on battery life.

If I recall correctly, the BLE detection is by default “momentary”. It will toggle on and off quickly when a packet is detected?

Typically you’d then configure a “delayed_off” type setting to set the time between when the device was “last seen” and it is “assumed gone” to bridge the broadcasts and get a stable “present”.

So if that’s all the case, it’s confusing why it would take 10minutes to show as “away” without setting it up to do that intentionally?

Could it be that you are using the Device Tracker in Home Assistant with the consider_home parameter set to 600 seconds (10 minutes)? If so, you can modify this parameter to shorten the time.

Hello

To provide more details:
Both Nut and Amazfit (watch) are detected by a ESPHome close to the door.
As you can see, the door has been opened at 07:10:09.
Both Nut and Amazfit have switch to undetected at 07:15:38 at the same time
And my presence sensor (not a device_tracker) was cleared at 10:19:41

The delay for the NUT and Amazfit is the same for both devices. The issue (delay 5 minutes) seems to be linked to the esp.

There is an additional time of 5 minutes between the ESP sensor (Nut) and the presence sensor
The presence sensor is an helper with this definition.

{% if is_state('binary_sensor.arnaud_nut','on') %} 
home
{% else %} not_home
{% endif %}

I thought that the helper should have been immediately updated when the binary_sensor.arnaud_nut
is modified .
Any idea how to improve that ?

I have still a delay at esphome level.

Thanks for your thoughts.
Regards