gf-bt-proxy-01.yaml 2.6 KB

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