Browse Source

Add ESPhome implementation to integrate with home assistant

master
Elis Hirwing 2 years ago
parent
commit
989e428cca
Signed by: etu GPG Key ID: D57EFA625C9A925F
  1. 10
      esphome/.gitignore
  2. 4
      esphome/README.org
  3. 4
      esphome/secrets.yaml
  4. 31
      esphome/watersensor.yaml

10
esphome/.gitignore

@ -0,0 +1,10 @@
# Gitignore settings for ESPHome
# This is an example and may include too much for your use-case.
# You can modify this file to suit your needs.
/.esphome/
**/.pioenvs/
**/.piolibdeps/
**/lib/
**/src/
**/platformio.ini
/secrets.yaml

4
esphome/README.org

@ -0,0 +1,4 @@
* Building and installing on NodeMCU
#+BEGIN_SRC sh
esphome watersensor.yaml run
#+END_SRC

4
esphome/secrets.yaml

@ -0,0 +1,4 @@
wifi_ssid: <ssid>
wifi_password: <psk>
api_password: <api-password>
ota_password: <ota-password>

31
esphome/watersensor.yaml

@ -0,0 +1,31 @@
esphome:
name: livingroom_watersensor1
platform: ESP8266
board: nodemcu
# Set up Wifi
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable logging
logger:
# Enable Home Assistant API
api:
password: !secret api_password
# Enable OTA updates
ota:
password: !secret ota_password
# Configure ADC to read moisture data and output percentage
sensor:
- platform: adc
pin: A0
name: "Chilli Moisture Sensor"
filters:
- calibrate_linear:
- 0.30 -> 100.00
- 0.90 -> 0.00
update_interval: 60s
Loading…
Cancel
Save