Browse Source

First proper revision of shower.yaml

master
Maximilian Stiefel 24 hours ago
parent
commit
5465d711b7
  1. 4
      README.md
  2. BIN
      pdfs/BST-BME280_DS001-10.pdf
  3. BIN
      pdfs/nodemcu-v3-ch340-schematics.pdf
  4. BIN
      pdfs/schematic_esp-12e.pdf
  5. 91
      shower.yaml

4
README.md

@ -1,3 +1 @@
# Esphome_configs
In his repository I collect my esphome configurations.
https://shelly-api-docs.shelly.cloud/gen2/ComponentsAndServices/Switch

BIN
pdfs/BST-BME280_DS001-10.pdf

Binary file not shown.

BIN
pdfs/nodemcu-v3-ch340-schematics.pdf

Binary file not shown.

BIN
pdfs/schematic_esp-12e.pdf

Binary file not shown.

91
shower.yaml

@ -0,0 +1,91 @@
esphome:
name: shower
esp8266:
board: nodemcuv2
# Enable logging
logger:
http_request:
verify_ssl: false
# Enable Home Assistant API
api:
password: "4FExAkAyCl"
ota:
- platform: esphome
password: "4FExAkAyCl"
wifi:
ssid: "5G_Router_37F6E8"
password: "7rCD6C2F27F7"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Shower Fallback Hotspot"
password: "ZzY1E2eNv819"
captive_portal:
switch:
- platform: gpio
name: "LEDDI"
pin: GPIO2
inverted: true
web_server:
port: 80
# HW SPI
spi:
- id: spi_bus
clk_pin: D5
mosi_pin: D7
miso_pin: D6
interface: hardware
# Global variable for state machine
globals:
- id: turned_on_fan
type: boolean
initial_value: "false"
# BME280 sensor
sensor:
- platform: bme280_spi
temperature:
name: "BME280 Temperature"
id: bme280_temperature
humidity:
name: "BME280 Humidity"
id: bme280_humidity
on_value:
then:
- if:
condition:
lambda: "return ( id(bme280_humidity).state >= 60.0 && !id(turned_on_fan) ); // Humidity reached threshold of 60 % and fan has not been turned on yet"
then:
- lambda: |-
id(turned_on_fan) = true; // This node needs to turn off fan if it was the one that turned it on. Therefore we memorize it.
- http_request.get:
url: "http://shelly1pmminig3-54320455c604.local/rpc/Switch.Set?on=true&id=0"
else:
- if:
condition:
lambda: "return id(bme280_humidity).state <= 50.0 && id(turned_on_fan); // Hysteresis."
then:
- lambda: |-
id(turned_on_fan) = false; // Reset fan.
- http_request.get:
url: "http://shelly1pmminig3-54320455c604.local/rpc/Switch.Set?on=false&id=0"
pressure:
name: "BME280 Pressure"
id: bme280_pressure
cs_pin: GPIO4
update_interval: 10s
Loading…
Cancel
Save