From ff4913956083045ab773cb07fff9faa66a5701a8 Mon Sep 17 00:00:00 2001 From: Danny Tsang Date: Tue, 5 Oct 2021 22:07:14 +0100 Subject: [PATCH] Added ESPHome bed sensor config. --- esphome/bed.yaml | 62 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 esphome/bed.yaml diff --git a/esphome/bed.yaml b/esphome/bed.yaml new file mode 100644 index 00000000..2874afc5 --- /dev/null +++ b/esphome/bed.yaml @@ -0,0 +1,62 @@ +esphome: + name: bed + platform: ESP32 + board: esp32dev + +i2c: + sda: 21 + scl: 22 + scan: true + id: bus_a + +ads1115: + - address: 0x48 + continuous_mode: true + +esp32_ble_tracker: + +sensor: + - platform: ads1115 + multiplexer: 'A0_GND' + gain: 4.096 + name: "Bed Top Left" + - platform: ads1115 + multiplexer: 'A1_GND' + gain: 4.096 + name: "Bed Top Right" + filters: + - median: + window_size: 5 + send_every: 5 + send_first_at: 1 + - platform: ads1115 + multiplexer: 'A2_GND' + gain: 4.096 + name: "Bed Bottom Left" + - platform: ads1115 + multiplexer: 'A3_GND' + gain: 4.096 + name: "Bed Bottom Right" + # Platform sensors + - platform: uptime + name: Uptime Sensor + +# Enable logging +logger: + +# Enable Home Assistant API +api: + +ota: + password: "" + +wifi: + ssid: !secret wifi_iot_ssid + password: !secret wifi_password + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Bed Fallback Hotspot" + password: !secret bed_fallback_password + +captive_portal: