| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- substitutions:
- devicename: gf-bt-proxy-01
- low_devicename: gf_bt_proxy_01
- friendly_devicename: GF Bluetooth Proxy
- esphome:
- name: $devicename
- friendly_name: $friendly_devicename
- esp32:
- board: esp32dev
- framework:
- type: esp-idf
- # Enable logging
- logger:
- # Enable Home Assistant API
- api:
- encryption:
- key: "ejeMnlF5M60w/yuYwAWn/kIBz701xLwVkUGf9iN8uLA="
- ota:
- password: "2c27af3ab81f992e23745c20ab5dfc02"
- wifi:
- ssid: !secret iot_ssid
- password: !secret iot_password
- domain: .int.mmax.cloud
- # Enable fallback hotspot (captive portal) in case wifi connection fails
- ap:
- ssid: "Gf-Bt-Proxy-01 Fallback Hotspot"
- password: "Ry3eaIb2vmf1"
- improv_serial:
-
- esp32_ble_tracker:
- scan_parameters:
- # We currently use the defaults to ensure Bluetooth
- # can co-exist with WiFi In the future we may be able to
- # enable the built-in coexistence logic in ESP-IDF
- active: true
- # bluetooth_proxy:
- # active: true
- external_components:
- - source: github://myhomeiot/esphome-components
- ble_gateway:
- id: blegateway
- on_ble_advertise:
- then:
- homeassistant.event:
- event: esphome.on_ble_advertise
- data:
- packet: !lambda return packet;
- # gateway_id: ${device_id}
- binary_sensor:
- - platform: homeassistant
- id: ble_gateway_discovery
- entity_id: binary_sensor.ble_gateway
- attribute: discovery
- on_state:
- then:
- lambda: id(blegateway).set_discovery(x);
- text_sensor:
- - platform: homeassistant
- id: ble_gateway_devices
- entity_id: binary_sensor.ble_gateway
- attribute: devices
- on_value:
- then:
- lambda: id(blegateway).set_devices(x);
- switch:
- - platform: template
- id: switch_ble_gateway_discovery
- name: BLE Gateway Discovery
- icon: mdi:bluetooth-connect
- lambda: return id(blegateway).get_discovery();
- turn_on_action: [lambda: id(blegateway).set_discovery(true);]
- turn_off_action: [lambda: id(blegateway).set_discovery(false);]
- disabled_by_default: true
- entity_category: config
- button:
- - platform: safe_mode
- name: Safe Mode Boot
- entity_category: diagnostic
|