-
Notifications
You must be signed in to change notification settings - Fork 0
/
ble_gateway.yaml
91 lines (81 loc) · 2.07 KB
/
ble_gateway.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
esphome:
name: esp32c3-gateway
name_add_mac_suffix: true
platformio_options:
board_build.mcu: esp32c3
board_build.variant: esp32c3
external_components:
- source: github://myhomeiot/esphome-components
esp32:
variant: ESP32C3
board: airm2m_core_esp32c3
framework:
type: esp-idf
sdkconfig_options:
CONFIG_BT_BLE_50_FEATURES_SUPPORTED: y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED: y
CONFIG_ESP_TASK_WDT_TIMEOUT_S: "10"
logger:
api:
captive_portal:
ota:
- platform: esphome
password: 123456
# Change the WiFi config to a non-static IP if needed
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
output_power: 19.7dB
fast_connect: true
ap:
password: "12345678"
light:
- platform: esp32_rmt_led_strip
rgb_order: GRB
pin: GPIO08
num_leds: 1
rmt_channel: 0
chipset: ws2812
name: "My Light"
sensor:
- platform: wifi_signal
name: "WiFi Signal Sensor"
update_interval: 120s
# proxy all
esp32_ble_tracker:
ble_gateway:
id: blegateway
devices:
- mac_address: A4:C1:38:1D:88:DF
- mac_address: A4:C1:38:06:24:EB
- mac_address: E4:AA:EC:7D:3D:28
- mac_address: 18:C2:3C:2E:34:85
- mac_address: A4:C1:38:CE:D5:7F
- mac_address: A4:C1:38:6C:F1:28
- mac_address: A4:C1:38:39:F4:41
- mac_address: A4:C1:38:A3:48:85
on_ble_advertise:
then:
homeassistant.event:
event: esphome.on_ble_advertise
data:
packet: !lambda return packet;
gateway_id: ${device_id}
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