Metainformationen zur Seite
  •  

ESP32 Bluetooth Presence Detection

esp32-bluetooth-presence.yaml
substitutions:
  devicename: esp32-bluetooth-presence
  upper_devicename: ESP32 Bluetooth Presence

esphome:
  name: $devicename
  friendly_name: $upper_devicename
  on_boot:
    priority: 250.0
    then:

  on_loop:
    then:
      - if:
          condition:
            - not:
                - script.is_running: demo_script
          then:
            - script.execute: demo_script

esp32:
  board: esp32dev
  framework:
    type: arduino
 
# Enable logging
logger:
 level: VERY_VERBOSE

packages:
  wifi: !include packages/wifi.yaml
  mqtt: !include packages/mqtt.yaml
  ota:  !include packages/ota.yaml
 
# Enable Home Assistant API
api:

captive_portal:

esp32_ble_tracker:

  scan_parameters:
    interval: 320ms
    window: 30ms
#    duration: 10s
#    active: false

binary_sensor:
  - platform: ble_presence
    ibeacon_uuid: '68586f1e-89c2-11eb-8dcd-0242ac130003'
    name: "OnePlus6 im Büro"

script:
  id: demo_script
  mode: single
  then:
    - logger.log:
        format: "Ich bin ein NodeMCU ESP32-01"
    - delay: 10s