2018-09-26 18:39:41 +02:00
|
|
|
esphomeyaml:
|
2018-12-05 21:22:06 +01:00
|
|
|
name: $devicename
|
2018-09-26 18:39:41 +02:00
|
|
|
platform: ESP32
|
|
|
|
board: nodemcu-32s
|
|
|
|
# Use this for testing while developing:
|
|
|
|
# esphomelib_version:
|
|
|
|
# local: ~/path/to/esphomelib
|
|
|
|
use_custom_code: true
|
|
|
|
build_path: build/test2
|
|
|
|
|
2018-12-05 21:22:06 +01:00
|
|
|
substitutions:
|
|
|
|
devicename: test2
|
|
|
|
|
2018-09-26 18:39:41 +02:00
|
|
|
wifi:
|
|
|
|
ssid: 'MySSID'
|
|
|
|
password: 'password1'
|
|
|
|
reboot_timeout: 120s
|
|
|
|
|
|
|
|
mqtt:
|
|
|
|
broker: '192.168.178.84'
|
|
|
|
port: 1883
|
|
|
|
username: 'debug'
|
|
|
|
password: 'debug'
|
|
|
|
|
|
|
|
i2c:
|
|
|
|
sda: 21
|
|
|
|
scl: 22
|
|
|
|
scan: False
|
|
|
|
|
|
|
|
spi:
|
|
|
|
clk_pin: GPIO21
|
|
|
|
mosi_pin: GPIO22
|
|
|
|
miso_pin: GPIO23
|
|
|
|
|
|
|
|
uart:
|
|
|
|
tx_pin: GPIO22
|
|
|
|
rx_pin: GPIO23
|
|
|
|
baud_rate: 115200
|
|
|
|
|
|
|
|
ota:
|
|
|
|
safe_mode: True
|
|
|
|
port: 3286
|
|
|
|
|
|
|
|
logger:
|
|
|
|
level: DEBUG
|
|
|
|
|
|
|
|
web_server:
|
|
|
|
|
|
|
|
deep_sleep:
|
|
|
|
run_duration: 20s
|
|
|
|
sleep_duration: 50s
|
|
|
|
|
|
|
|
sensor:
|
|
|
|
- platform: ble_rssi
|
|
|
|
mac_address: AC:37:43:77:5F:4C
|
|
|
|
name: "BLE Google Home Mini RSSI value"
|
|
|
|
- platform: xiaomi_miflora
|
|
|
|
mac_address: 94:2B:FF:5C:91:61
|
|
|
|
temperature:
|
|
|
|
name: "Xiaomi MiFlora Temperature"
|
|
|
|
moisture:
|
|
|
|
name: "Xiaomi MiFlora Moisture"
|
|
|
|
illuminance:
|
|
|
|
name: "Xiaomi MiFlora Illuminance"
|
|
|
|
conductivity:
|
|
|
|
name: "Xiaomi MiFlora Soil Conductivity"
|
|
|
|
battery_level:
|
|
|
|
name: "Xiaomi MiFlora Battery Level"
|
|
|
|
- platform: xiaomi_mijia
|
|
|
|
mac_address: 7A:80:8E:19:36:BA
|
|
|
|
temperature:
|
|
|
|
name: "Xiaomi MiJia Temperature"
|
|
|
|
humidity:
|
|
|
|
name: "Xiaomi MiJia Humidity"
|
|
|
|
battery_level:
|
|
|
|
name: "Xiaomi MiJia Battery Level"
|
2018-10-14 18:45:13 +02:00
|
|
|
- platform: mqtt_subscribe
|
|
|
|
name: "MQTT Subscribe Sensor 1"
|
|
|
|
topic: "mqtt/topic"
|
2018-10-20 12:41:00 +02:00
|
|
|
id: the_sensor
|
2018-10-14 18:45:13 +02:00
|
|
|
qos: 2
|
2018-10-20 12:41:00 +02:00
|
|
|
on_value:
|
|
|
|
- mqtt.publish_json:
|
|
|
|
topic: the/topic
|
|
|
|
payload: |-
|
|
|
|
root["key"] = id(the_sensor).value;
|
|
|
|
root["greeting"] = "Hello World";
|
2018-10-20 12:58:52 +02:00
|
|
|
- platform: pmsx003
|
|
|
|
type: PMSX003
|
|
|
|
pm_1_0:
|
|
|
|
name: "PM 1.0 Concentration"
|
|
|
|
pm_2_5:
|
|
|
|
name: "PM 2.5 Concentration"
|
|
|
|
pm_10_0:
|
|
|
|
name: "PM 10.0 Concentration"
|
|
|
|
- platform: pmsx003
|
|
|
|
type: PMS5003T
|
|
|
|
pm_2_5:
|
|
|
|
name: "PM 2.5 Concentration"
|
|
|
|
temperature:
|
|
|
|
name: "PMS Temperature"
|
|
|
|
humidity:
|
|
|
|
name: "PMS Humidity"
|
|
|
|
- platform: pmsx003
|
|
|
|
type: PMS5003ST
|
|
|
|
pm_2_5:
|
|
|
|
name: "PM 2.5 Concentration"
|
|
|
|
temperature:
|
|
|
|
name: "PMS Temperature"
|
|
|
|
humidity:
|
|
|
|
name: "PMS Humidity"
|
|
|
|
formaldehyde:
|
|
|
|
name: "PMS Formaldehyde Concentration"
|
2018-10-17 21:14:31 +02:00
|
|
|
- platform: cse7766
|
|
|
|
voltage:
|
|
|
|
name: "CSE7766 Voltage"
|
|
|
|
current:
|
|
|
|
name: "CSE7766 Current"
|
|
|
|
power:
|
|
|
|
name: "CSE776 Power"
|
2019-01-05 19:52:01 +01:00
|
|
|
- platform: apds9960
|
|
|
|
type: proximity
|
|
|
|
name: APDS9960 Proximity
|
|
|
|
- platform: apds9960
|
|
|
|
type: clear
|
|
|
|
name: APDS9960 Clear
|
|
|
|
- platform: apds9960
|
|
|
|
type: red
|
|
|
|
name: APDS9960 Red
|
|
|
|
- platform: apds9960
|
|
|
|
type: green
|
|
|
|
name: APDS9960 Green
|
|
|
|
- platform: apds9960
|
|
|
|
type: blue
|
|
|
|
name: APDS9960 Blue
|
|
|
|
|
|
|
|
apds9960:
|
|
|
|
address: 0x20
|
|
|
|
update_interval: 60s
|
2018-09-26 18:39:41 +02:00
|
|
|
|
|
|
|
esp32_touch:
|
|
|
|
setup_mode: True
|
|
|
|
|
|
|
|
binary_sensor:
|
|
|
|
- platform: esp32_ble_tracker
|
|
|
|
mac_address: AC:37:43:77:5F:4C
|
|
|
|
name: "ESP32 BLE Tracker Google Home Mini"
|
|
|
|
- platform: esp32_touch
|
|
|
|
name: "ESP32 Touch Pad GPIO27"
|
|
|
|
pin: GPIO27
|
|
|
|
threshold: 1000
|
2019-01-05 19:52:01 +01:00
|
|
|
- platform: apds9960
|
|
|
|
direction: up
|
|
|
|
name: APDS9960 Up
|
|
|
|
- platform: apds9960
|
|
|
|
direction: down
|
|
|
|
name: APDS9960 Down
|
|
|
|
- platform: apds9960
|
|
|
|
direction: left
|
|
|
|
name: APDS9960 Left
|
|
|
|
- platform: apds9960
|
|
|
|
direction: right
|
|
|
|
name: APDS9960 Right
|
2018-09-26 18:39:41 +02:00
|
|
|
|
|
|
|
remote_receiver:
|
|
|
|
pin: GPIO32
|
|
|
|
dump: []
|
|
|
|
|
|
|
|
esp32_ble_tracker:
|
|
|
|
scan_interval: 300s
|
|
|
|
|
|
|
|
esp32_ble_beacon:
|
|
|
|
type: iBeacon
|
|
|
|
uuid: 'c29ce823-e67a-4e71-bff2-abaa32e77a98'
|
|
|
|
|
|
|
|
status_led:
|
|
|
|
pin: GPIO2
|
2018-10-17 21:24:02 +02:00
|
|
|
|
|
|
|
text_sensor:
|
|
|
|
- platform: version
|
|
|
|
name: "Esphomelib Version"
|
|
|
|
icon: mdi:icon
|
|
|
|
id: version_sensor
|
|
|
|
on_value:
|
2018-12-05 21:22:06 +01:00
|
|
|
- lambda: !lambda |-
|
2018-10-20 15:16:58 +02:00
|
|
|
ESP_LOGD("main", "The state is %s=%s", x.c_str(), id(version_sensor).state.c_str());
|
2018-10-20 12:58:02 +02:00
|
|
|
- script.execute: my_script
|
2018-10-17 21:24:02 +02:00
|
|
|
- platform: mqtt_subscribe
|
|
|
|
name: "MQTT Subscribe Text"
|
|
|
|
topic: "the/topic"
|
|
|
|
qos: 2
|
|
|
|
- platform: template
|
|
|
|
name: "Template Text Sensor"
|
|
|
|
lambda: |-
|
|
|
|
return {"Hello World"};
|
2018-10-20 12:58:02 +02:00
|
|
|
|
|
|
|
script:
|
|
|
|
- id: my_script
|
|
|
|
then:
|
|
|
|
- lambda: 'ESP_LOGD("main", "Hello World!");'
|