Restart btproxy if no scan within 10 minutes
Mitigates https://github.com/esphome/issues/issues/6701
This commit is contained in:
@@ -22,11 +22,19 @@ esp32_ble_tracker:
|
||||
- sensor.template.publish:
|
||||
id: ble_scans_finished
|
||||
state: !lambda 'return ++id(ble_scans);'
|
||||
- script.execute: restart_after_delay
|
||||
|
||||
bluetooth_proxy:
|
||||
id: btproxy
|
||||
active: true
|
||||
|
||||
script:
|
||||
- id: restart_after_delay
|
||||
mode: restart
|
||||
then:
|
||||
- delay: 10min
|
||||
- button.press: restart_button
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
name: "btproxy connections free"
|
||||
|
||||
@@ -2,3 +2,4 @@ button:
|
||||
- platform: restart
|
||||
name: "ESP chip restart"
|
||||
entity_category: diagnostic
|
||||
id: restart_button
|
||||
|
||||
Reference in New Issue
Block a user