[ln882h_ble_tracker] Automation triggers and actions (#17778)

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Edvard Filistovič
2026-08-05 09:30:46 -05:00
committed by GitHub
co-authored by pre-commit-ci-lite[bot] J. Nick Koston
parent 64f0e38a51
commit d548454dbe
7 changed files with 517 additions and 3 deletions
@@ -0,0 +1,33 @@
packages:
ln882h_ble_tracker: !include common.yaml
esphome:
on_boot:
then:
- ln882h_ble_tracker.start_scan
- ln882h_ble_tracker.start_scan:
continuous: true
- ln882h_ble_tracker.start_scan:
continuous: !lambda return false;
- ln882h_ble_tracker.stop_scan
ln882h_ble_tracker:
on_ble_advertise:
- mac_address: AC:37:43:77:5F:4C
then:
- lambda: |-
ESP_LOGD("main", "The device address is %s", x.address_str().c_str());
on_ble_service_data_advertise:
- service_uuid: ABCD
then:
- lambda: |-
ESP_LOGD("main", "Length of service data is %zu", x.size());
on_ble_manufacturer_data_advertise:
- manufacturer_id: ABCD
then:
- lambda: |-
ESP_LOGD("main", "Length of manufacturer data is %zu", x.size());
on_scan_end:
- then:
- lambda: |-
ESP_LOGD("main", "Scan ended");