Files
NSPanel_HA_Blueprint/esphome/nspanel_esphome_addon_ble_tracker.yaml
2024-04-22 11:07:33 +02:00

37 lines
1.5 KiB
YAML

#####################################################################################################
##### NSPANEL ESPHOME created by Blackymas - https://github.com/Blackymas/NSPanel_HA_Blueprint #####
##### ESPHome Add-on for BLE Tracker #####
##### PLEASE only make changes if it is necessary and also the required knowledge is available. #####
##### For normal use with the Blueprint, no changes are necessary. #####
#####################################################################################################
##### ATTENTION: This will add climate elements to the core system and requires the core part. #####
#####################################################################################################
---
# Enable Bluetooth tracker
esp32_ble_tracker:
id: ble_tracker
esphome:
platformio_options:
build_flags:
- -D NSPANEL_HA_BLUEPRINT_ADDON_BLE_TRACKER
script:
- id: !extend dump_config
then:
- lambda: |-
// Check if this is installed with Arduino
#ifdef USE_ARDUINO
#error "Invalid settings for add-on BLE Tracker. Arduino framework is not supported when using Bluetooth in this project."
#endif
if (!id(is_uploading_tft)) {
static const char *const TAG = "nspanel_ha_blueprint";
ESP_LOGCONFIG(TAG, "Add-on BLE Tracker");
}
# Set Wi-Fi power save mode to "LIGHT" as required for Bluetooth on ESP32
wifi:
power_save_mode: LIGHT
...