Direct Solution Snippet
Home Assistant presence automations fail when using both Wi-Fi detection and BLE tracking because the two systems report conflicting presence states, BLE scanners may introduce signal delays, and ESPHome devices can overload the network or misreport RSSI values. Ensuring synchronized presence logic, optimizing BLE scan intervals, and improving network stability resolves the issue.
Preliminary Diagnostic Steps
1. Check Device Presence History
In Home Assistant:
- Go to Developer Tools → States
- Select your phone/device entity
- Review presence history for:
- Frequent toggling between home/not_home
- Inconsistent RSSI values
- Overlapping timestamps between Wi-Fi and
BLE
If states contradict
each other → automation failure is expected.
2. Review ESPHome BLE Logs
Open ESPHome device
logs and check for:
- BLE scan timeouts
- Weak RSSI readings
- Repeated "device not found"
events
- Sudden disconnects
These indicate
unstable BLE tracking.
3. Inspect Wi-Fi Router Settings
Wi-Fi presence
detection becomes inaccurate if:
- Your router uses Aggressive Power
Saving
- The device switches between 2.4GHz/5GHz
- WPA3 handshake delays occur
- MAC address randomization is active
Any of these can delay
detection.
4. Check BLE Scanner Placement
Verify that ESPHome
devices are:
- Close enough to detect your BLE beacon or
smartphone
- Not blocked by concrete walls
- Not near metal appliances or Wi-Fi 6
routers
Poor placement →
inaccurate BLE detection.
Step-by-Step Technical Fix
1. Synchronize Presence Conditions
In your automation,
replace:
trigger:
- platform: state
entity_id: device_tracker.my_phone
with:
condition:
- condition: or
conditions:
- condition: state
entity_id: device_tracker.wifi_my_phone
state: 'home'
- condition: state
entity_id: device_tracker.ble_my_phone
state: 'home'
This prevents one
system from cancelling the other.
2. Increase BLE Scan Interval on ESPHome
In your ESPHome
config:
esp32_ble_tracker:
scan_parameters:
interval: 300ms
window: 150ms
This improves BLE
stability and prevents false negatives.
3. Reduce ESPHome Load
Disable unnecessary
components:
- LED effects
- Continuous sensors
- Verbose logging
Resource overload
causes BLE scanning delays.
4. Disable MAC Randomization on Smartphone
On Android/iOS:
- Go to Wi-Fi settings → Disable MAC
Privacy
This ensures consistent detection.
5. Keep Wi-Fi from Switching Bands
Force your phone to
use:
- Only 2.4 GHz for presence
or - Create a dedicated SSID for presence
detection.
Bandwidth switching
confuses detection.
6. Improve BLE Accuracy
Move ESPHome BLE
trackers:
- Away from Wi-Fi routers
- Away from large metal bodies
- Closer to exit points to better detect
leaving events
7. Use Unified Presence Systems
Add Room Assistant
or Home Assistant Companion App to unify:
- Wi-Fi
- BLE
- GPS
- Router-based detection
- Phone-based detection
Unified presence =
fewer automation conflicts.
Preventing Future Conflict
1. Use “Weighted Presence Logic”
Assign priority:
- BLE for indoor micro-location
- Wi-Fi for general home presence
Combine them using Bayesian
sensors for higher accuracy.
2. Tune BLE and Wi-Fi Responsiveness Separately
Do not use identical
timeouts.
Example:
- BLE timeout: 45 seconds
- Wi-Fi timeout: 30 seconds
This prevents
simultaneous "not_home" reports.
3. Keep ESPHome Firmware Updated
BLE improvements are
frequent.
4. Avoid Overlapping BLE Scanners
Too many ESPHome BLE
devices → duplicate packets and delays.
5. Monitor Mesh Network Health
Use:
- Wi-Fi Channel 1 / 6 / 11
- Avoid heavy overlap on 2.4GHz
- Use Static IPs for ESPHome devices to
prevent DHCP delays
6. Test Automations with Presence Simulator
Use Home Assistant
"Device Traces" to ensure automation logic matches expected presence
events.