Closed DunklerPhoenix closed 2 years ago
For e.g. this one does nothing:
esphome:
name: esphome-kueche-ble-gateway
external_components:
- source: github://myhomeiot/esphome-components
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: ""
wifi:
ssid: !secret wifi24_username
password: !secret wifi24_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esphome-Kueche-Ble-Gateway"
password: ""
captive_portal:
esp32_ble_tracker:
# ESPHome
ble_gateway:
id: blegateway
on_ble_advertise:
then:
homeassistant.event:
event: esphome.on_ble_advertise
data:
packet: !lambda return packet;
gateway_id: ${device_id}
Hello,
Discovery it's a configuration parameter and can be enabled as any other parameters in ESPHome (discovery: true
):
ble_gateway:
id: blegateway
discovery: true
on_ble_advertise:
then:
homeassistant.event:
event: esphome.on_ble_advertise
data:
packet: !lambda return packet;
gateway_id: ${device_id}
Without discovery you should specify devices
MAC addresses like in this example or use advanced configuration with one of the described methods for initial device detection by Passive BLE Monitor (check important note section of advanced configuration).
Ahhhh. Thank you. Didn't understand it correctly :P
Heho. I'm trying to get the ble_gateway to work, but if discovery is disabled (which is default) the on_ble_advertise doesn't trigger.
How to enable discovery by default? Without it the examples in you documentation do nothing.