gf-bt-proxy-01.yaml 2.4 KB

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