mirror of
https://github.com/jdillenburg/esphome.git
synced 2026-01-10 07:10:39 -07:00
yaml
This commit is contained in:
61
trash/adxl345-test.yaml
Normal file
61
trash/adxl345-test.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
esphome:
|
||||
name: adxl345-test
|
||||
friendly_name: ADXL345 Test
|
||||
|
||||
includes:
|
||||
- ADXL345.h
|
||||
libraries:
|
||||
- "Wire"
|
||||
- "SPI"
|
||||
- "Adafruit BusIO"
|
||||
- "Adafruit Unified Sensor"
|
||||
- "Adafruit ADXL345"
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
framework:
|
||||
type: arduino
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
encryption:
|
||||
key: "/v0qaJ9WNLlO/ceNxMjQN/4L1kDpg4xF3GB+huSE9uU="
|
||||
|
||||
ota:
|
||||
password: "d29c9732c14ab553c7b61cf7518893b8"
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "Adxl345-Test Fallback Hotspot"
|
||||
password: "51tWtojf169e"
|
||||
|
||||
captive_portal:
|
||||
|
||||
i2c:
|
||||
sda: 21
|
||||
scl: 22
|
||||
scan: true
|
||||
|
||||
sensor:
|
||||
- platform: custom
|
||||
lambda: |-
|
||||
auto adxl345 = new ADXL345Sensor();
|
||||
App.register_component(adxl345);
|
||||
return {
|
||||
adxl345->off_vertical
|
||||
};
|
||||
sensors:
|
||||
- name: "Off Vertical"
|
||||
unit_of_measurement: percentage
|
||||
filters:
|
||||
- sliding_window_moving_average:
|
||||
window_size: 5
|
||||
send_every: 5
|
||||
- lambda: return 100 * x / 45.0;
|
||||
Reference in New Issue
Block a user