gf-bt-proxy-01.yaml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. scan_parameters:
  31. # active: True
  32. # We currently use the defaults to ensure Bluetooth
  33. # can co-exist with WiFi In the future we may be able to
  34. # enable the built-in coexistence logic in ESP-IDF
  35. active: true
  36. interval: 1110ms
  37. window: 1100ms
  38. # on_scan_end:
  39. # - then:
  40. # - lambda: |-
  41. # ESP_LOGD("ble_auto", "The scan has ended!");
  42. bluetooth_proxy:
  43. active: true
  44. # external_components:
  45. # - source: github://myhomeiot/esphome-components
  46. #ble_monitor:
  47. # discovery: true
  48. # restore_state: true
  49. # decimals: 1
  50. # period: 300
  51. # ble_gateway:
  52. # id: blegateway
  53. # on_ble_advertise:
  54. # then:
  55. # homeassistant.event:
  56. # event: esphome.on_ble_advertise
  57. # data:
  58. # packet: !lambda return packet;
  59. #
  60. # binary_sensor:
  61. # - platform: homeassistant
  62. # id: ble_gateway_discovery
  63. # entity_id: binary_sensor.ble_gateway
  64. # attribute: discovery
  65. # on_state:
  66. # then:
  67. # lambda: id(blegateway).set_discovery(x);
  68. #
  69. # text_sensor:
  70. # - platform: homeassistant
  71. # id: ble_gateway_devices
  72. # entity_id: binary_sensor.ble_gateway
  73. # attribute: devices
  74. # on_value:
  75. # then:
  76. # lambda: id(blegateway).set_devices(x);
  77. #
  78. # switch:
  79. # - platform: template
  80. # id: switch_ble_gateway_discovery
  81. # name: BLE Gateway Discovery
  82. # icon: mdi:bluetooth-connect
  83. # lambda: return id(blegateway).get_discovery();
  84. # turn_on_action: [lambda: id(blegateway).set_discovery(true);]
  85. # turn_off_action: [lambda: id(blegateway).set_discovery(false);]
  86. # disabled_by_default: true
  87. # entity_category: config
  88. #
  89. # button:
  90. # - platform: safe_mode
  91. # name: Safe Mode Boot
  92. # entity_category: diagnostic