Skip to content

Commit d060aa8

Browse files
committed
Restart btproxy if no scan within 10 minutes
Mitigates esphome/issues#6701
1 parent 202fd92 commit d060aa8

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

templates/btproxy.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,19 @@ esp32_ble_tracker:
2222
- sensor.template.publish:
2323
id: ble_scans_finished
2424
state: !lambda 'return ++id(ble_scans);'
25+
- script.execute: restart_after_delay
2526

2627
bluetooth_proxy:
2728
id: btproxy
2829
active: true
2930

31+
script:
32+
- id: restart_after_delay
33+
mode: restart
34+
then:
35+
- delay: 10min
36+
- button.press: restart_button
37+
3038
sensor:
3139
- platform: template
3240
name: "btproxy connections free"

templates/restart.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ button:
22
- platform: restart
33
name: "ESP chip restart"
44
entity_category: diagnostic
5+
id: restart_button

0 commit comments

Comments
 (0)