Skip to content

Commit 72071d4

Browse files
Merge pull request #61 from bjw-s/main
fix: Only stop BLE scanning when the last API client disconnects
2 parents 34cf8dc + fff3aa9 commit 72071d4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

esphome-common/bluetooth-proxy.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ api:
33
- esp32_ble_tracker.start_scan:
44
continuous: true
55
on_client_disconnected:
6-
- esp32_ble_tracker.stop_scan:
6+
if:
7+
condition:
8+
not:
9+
api.connected:
10+
then:
11+
- esp32_ble_tracker.stop_scan:
712

813
bluetooth_proxy:
914
active: true

0 commit comments

Comments
 (0)