mirror of
https://github.com/esphome/esphome.git
synced 2024-11-15 11:38:11 +01:00
5e62c489b0
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
esphome:
|
|
on_boot:
|
|
then:
|
|
- esp32_ble_tracker.start_scan
|
|
- esp32_ble_tracker.stop_scan
|
|
|
|
esp32_ble_tracker:
|
|
on_ble_advertise:
|
|
- mac_address:
|
|
- AA:BB:CC:DD:EE:FF
|
|
- FF:EE:DD:CC:BB:AA
|
|
then:
|
|
# yamllint disable rule:line-length
|
|
- lambda: !lambda |-
|
|
ESP_LOGD("main", "The device address (%s) exists in list", x.address_str().c_str());
|
|
# yamllint enable rule:line-length
|
|
- mac_address: AC:37:43:77:5F:4C
|
|
then:
|
|
# yamllint disable rule:line-length
|
|
- lambda: !lambda |-
|
|
ESP_LOGD("main", "The device address is %s", x.address_str().c_str());
|
|
# yamllint enable rule:line-length
|
|
- then:
|
|
# yamllint disable rule:line-length
|
|
- lambda: !lambda |-
|
|
ESP_LOGD("main", "The device address is %s", x.address_str().c_str());
|
|
# yamllint enable rule:line-length
|
|
on_ble_service_data_advertise:
|
|
- service_uuid: ABCD
|
|
then:
|
|
- lambda: !lambda |-
|
|
ESP_LOGD("main", "Length of service data is %i", x.size());
|
|
on_ble_manufacturer_data_advertise:
|
|
- manufacturer_id: ABCD
|
|
then:
|
|
- lambda: !lambda |-
|
|
ESP_LOGD("main", "Length of manufacturer data is %i", x.size());
|
|
on_scan_end:
|
|
- then:
|
|
- lambda: |-
|
|
ESP_LOGD("ble_auto", "The scan has ended!");
|
|
|
|
wifi:
|
|
ssid: MySSID
|
|
password: password1
|
|
|
|
ota:
|
|
- platform: esphome
|