Hello,
I need some help because I've been stuck for several days trying to fix a presence detection system that had been working reliably for months and suddenly broke after updating Home Assistant.
My knowledge level is fairly limited. I originally built this system months ago by following tutorials and through a lot of trial and error. The problem is that I no longer remember exactly what I modified, which parts are still necessary, and which parts might now be obsolete.
How the system worked
I use ESPresense for room-level presence detection, but I also use it to determine whether someone is inside or outside the house.
The main logic is that it should never mark someone as not_home simply because BLE detection is lost. Before considering someone to have left the house, I also check additional conditions, especially whether the main door has been opened recently.
This setup worked reliably for months.
The problem after the update
After updating Home Assistant, the system started behaving erratically. Devices are now being marked as not_home when they shouldn't be, even when none of the conditions required to determine that someone has left the house have been met.
In addition, Home Assistant reports errors related to the following configuration:
device_tracker:
- platform: mqtt
devices:
persona1_cocina: 'espresence/cocina/persona1'
dispositivo_ble_cocina: 'espresence/cocina/dispositivo_ble'
payload_home: 'home'
payload_not_home: 'not_home'
availability_topic: 'espresence/cocina/availability'
payload_available: 'online'
payload_not_available: 'offline'
- platform: mqtt
devices:
persona1_habitacion: 'espresence/habitacion/persona1'
dispositivo_ble_habitacion: 'espresence/habitacion/dispositivo_ble'
payload_home: 'home'
payload_not_home: 'not_home'
availability_topic: 'espresence/habitacion/availability'
payload_available: 'online'
payload_not_available: 'offline'
- platform: mqtt
devices:
persona1_dormitorio: 'espresence/dormitorio/persona1'
dispositivo_ble_dormitorio: 'espresence/dormitorio/dispositivo_ble'
payload_home: 'home'
payload_not_home: 'not_home'
availability_topic: 'espresence/dormitorio/availability'
payload_available: 'online'
payload_not_available: 'offline'
- platform: mqtt
devices:
persona1_salon: 'espresence/salon/persona1'
dispositivo_ble_salon: 'espresence/salon/dispositivo_ble'
payload_home: 'home'
payload_not_home: 'not_home'
availability_topic: 'espresence/salon/availability'
payload_available: 'online'
payload_not_available: 'offline'
From what I've read, it appears that this method of creating MQTT device trackers using platform: mqtt has either been deprecated or removed recently.
What I don't know is whether this configuration is still affecting my setup or whether it has effectively become dead code.
MQTT Room Sensors
I also use the following MQTT Room sensors:
- platform: mqtt_room
device_id: "iBeacon:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
name: 'BLE Person 1'
state_topic: 'espresense/devices/iBeacon:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
timeout: 10
away_timeout: 60
- platform: mqtt_room
device_id: "iBeacon:YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY"
name: 'BLE Person 2'
state_topic: 'espresense/devices/iBeacon:YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY'
timeout: 10
away_timeout: 60
These sensors still seem to detect rooms correctly, but the final presence state is no longer reliable.
Main Automation
This automation listens for BLE room changes and updates the device tracker:
alias: Update BLE Device Tracker
description: ""
triggers:
- entity_id:
- sensor.ble_persona1
trigger: state
conditions:
- condition: template
value_template: "{{ trigger.from_state.state != trigger.to_state.state }}"
actions:
- data:
dev_id: dispositivo_ble
location_name: >
{% set puerta_reciente = (now() -
states.binary_sensor.puerta_principal.last_changed).total_seconds()
< 180 %}
{% if trigger.to_state.state in ['habitacion1', 'habitacion2',
'habitacion3', 'habitacion4'] %}
home
{% elif puerta_reciente and trigger.to_state.state in ['not_home',
'unknown'] %}
not_home
{% else %}
unknown
{% endif %}
action: device_tracker.see
mode: single
Correction Automation
When the BLE tracker remains in unknown for too long, I use Wi-Fi and GPS information to correct the state:
alias: Correct Unknown BLE State
description: |
If BLE remains unknown for more than 3 minutes, use Wi-Fi and GPS to correct the state.
triggers:
- entity_id:
- device_tracker.dispositivo_ble
to:
- unknown
for:
minutes: 3
trigger: state
conditions:
- condition: or
conditions:
- condition: not
conditions:
- condition: zone
entity_id: person.persona1
zone: zone.home
- condition: template
value_template: >
{{ (now() -
states.binary_sensor.puerta_principal.last_changed).total_seconds()
> 180 }}
actions:
- choose:
- conditions:
- condition: or
conditions:
- condition: state
entity_id: sensor.movil_wifi
state: Disconnected
- condition: not
conditions:
- condition: zone
entity_id: person.persona1
zone: zone.home
sequence:
- data:
dev_id: dispositivo_ble
location_name: not_home
action: device_tracker.see
- conditions:
- condition: state
entity_id: sensor.movil_wifi
state: MY_WIFI_NAME
- condition: zone
entity_id: person.persona1
zone: zone.home
sequence:
- data:
dev_id: dispositivo_ble
location_name: home
action: device_tracker.see
mode: single
What I Need Help Understanding
- Could the removal of
device_tracker: platform: mqttexplain this behavior? - Is that configuration still being used by my automations, or is it effectively ignored now?
- Is there a way to identify which automations, scripts, or entities still depend on those old MQTT device trackers?
- Could recent changes in Home Assistant's MQTT or Device Tracker integrations cause
device_tracker.dispositivo_bleto be set tonot_homewhile bypassing the logic shown above? - Do you see any obvious issues in these automations that could explain the behavior?
At the moment, I have reverted to a Home Assistant 2026.5.4 backup because after updating to 2026.6.x the presence system becomes unreliable.
Any guidance would be greatly appreciated. I've spent several days trying to track down the root cause and I'm no longer sure whether I'm looking in the right place or if the entire setup needs to be migrated to a newer approach.
Thank you.