diff --git a/templates/btproxy.yaml b/templates/btproxy.yaml index a639a1d..b528115 100644 --- a/templates/btproxy.yaml +++ b/templates/btproxy.yaml @@ -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" diff --git a/templates/restart.yaml b/templates/restart.yaml index cbd6ae4..e304e03 100644 --- a/templates/restart.yaml +++ b/templates/restart.yaml @@ -2,3 +2,4 @@ button: - platform: restart name: "ESP chip restart" entity_category: diagnostic + id: restart_button