gf-bt-proxy-01.yaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. substitutions:
  2. devicename: gf-bt-proxy-01
  3. low_devicename: gf_bt_proxy_01
  4. friendly_devicename: GF Bluetooth Proxy
  5. esphome:
  6. name: $devicename
  7. friendly_name: $friendly_devicename
  8. esp32:
  9. board: esp32dev
  10. framework:
  11. # type: arduino
  12. type: esp-idf
  13. packages:
  14. # Enable Home Assistant API
  15. esphome: !include common/keys.yaml
  16. diag: !include common/diag.yaml
  17. # Enable logging
  18. logger:
  19. web_server:
  20. port: 80
  21. wifi:
  22. ssid: !secret iot_ssid
  23. password: !secret iot_password
  24. domain: .int.mmax.cloud
  25. # # Enable fallback hotspot (captive portal) in case wifi connection fails
  26. # ap:
  27. # ssid: "Gf-Bt-Proxy-01 Fallback Hotspot"
  28. # password: "Ry3eaIb2vmf1"
  29. esp32_ble_tracker:
  30. max_connections: 5
  31. scan_parameters:
  32. # active: True
  33. # We currently use the defaults to ensure Bluetooth
  34. # can co-exist with WiFi In the future we may be able to
  35. # enable the built-in coexistence logic in ESP-IDF
  36. active: true
  37. interval: 1110ms
  38. window: 1100ms
  39. # on_scan_end:
  40. # - then:
  41. # - lambda: |-
  42. # ESP_LOGD("ble_auto", "The scan has ended!");
  43. bluetooth_proxy:
  44. active: true
  45. connection_slots: 5
  46. # external_components:
  47. # - source: github://myhomeiot/esphome-components
  48. #ble_monitor:
  49. # discovery: true
  50. # restore_state: true
  51. # decimals: 1
  52. # period: 300
  53. # ble_gateway:
  54. # id: blegateway
  55. # on_ble_advertise:
  56. # then:
  57. # homeassistant.event:
  58. # event: esphome.on_ble_advertise
  59. # data:
  60. # packet: !lambda return packet;
  61. #
  62. # binary_sensor:
  63. # - platform: homeassistant
  64. # id: ble_gateway_discovery
  65. # entity_id: binary_sensor.ble_gateway
  66. # attribute: discovery
  67. # on_state:
  68. # then:
  69. # lambda: id(blegateway).set_discovery(x);
  70. #
  71. # text_sensor:
  72. # - platform: homeassistant
  73. # id: ble_gateway_devices
  74. # entity_id: binary_sensor.ble_gateway
  75. # attribute: devices
  76. # on_value:
  77. # then:
  78. # lambda: id(blegateway).set_devices(x);
  79. #
  80. # switch:
  81. # - platform: template
  82. # id: switch_ble_gateway_discovery
  83. # name: BLE Gateway Discovery
  84. # icon: mdi:bluetooth-connect
  85. # lambda: return id(blegateway).get_discovery();
  86. # turn_on_action: [lambda: id(blegateway).set_discovery(true);]
  87. # turn_off_action: [lambda: id(blegateway).set_discovery(false);]
  88. # disabled_by_default: true
  89. # entity_category: config
  90. #
  91. # button:
  92. # - platform: safe_mode
  93. # name: Safe Mode Boot
  94. # entity_category: diagnostic