mirror of
https://github.com/esphome/esphome.git
synced 2026-10-06 10:56:43 +00:00
[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:
co-authored by
pre-commit-ci-lite[bot]
J. Nick Koston
parent
64f0e38a51
commit
d548454dbe
@@ -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");
|
||||
Reference in New Issue
Block a user