Files
zorruno-homeassistant/esphome/esp-laundryenv.yaml
T
2026-04-03 21:34:23 +13:00

179 lines
6.5 KiB
YAML

#:########################################################################################:#
# TITLE: LAUNDRY ENVIRONMENT - SONOFF DEV
# zorruno.com layout v1.1 2026
#:########################################################################################:#
# REPO:
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-laundryenv.yaml
#:########################################################################################:#
# VERSIONS:
# V1.1 2026-03-11 Updated yaml to zorruno layout V1.1
# V1.0 2025-03-28 Initial Version
#:########################################################################################:#
# HARDWARE:
# - Sonoff DEV
# - ESP8266 based
# - DHT temperature and humidity sensor on GPIO14
# - PIR input on GPIO13
# - Smoke detector input on GPIO5
# - Reference: https://wiki.iteadstudio.com/Sonoff_DEV
#:########################################################################################:#
# OPERATION NOTES:
# - Provides laundry temperature and humidity monitoring
# - Provides a PIR motion binary sensor
# - Provides a smoke detector binary sensor
# - Designed as a simple environmental and safety monitoring node
# - No relay or timed control logic is used in this yaml
#:########################################################################################:#
# OFFLINE NOTES:
# a) Home Assistant offline (network and MQTT online):
# - Device continues to read and publish local sensor states
# - PIR, smoke, temperature, and humidity sensing continue locally
#
# b) MQTT offline (or HA/MQTT offline):
# - Device continues sampling sensors locally
# - No MQTT-based status publishing will be available
#
# c) Entire WiFi/Network offline:
# - Device continues sampling sensors locally
# - No HA or MQTT connectivity will be available
# - Accurate time is not needed; SNTP is not required for operation
#:########################################################################################:#
#:########################################################################################:#
# SUBSTITUTIONS:
# Specific device variable substitutions
# If NOT using a secrets file, just replace these with the passwords etc (in quotes)
#:########################################################################################:#
substitutions:
# Device Naming
device_name: "esp-laundryenv"
friendly_name: "Laundry Environment"
description_comment: "Laundry Environment Sensor, PIR and Smoke Detector using Sonoff DEV (Layout V1.1)"
device_area: "Laundry"
# Project Naming
project_name: "Sonoff Technologies.Sonoff DEV"
project_version: "v1.1"
# Entity Naming
entity_prefix: "Laundry"
# Passwords and Secrets
api_key: !secret esp-laundryenv_api_key
ota_pass: !secret esp-laundryenv_ota_pass
static_ip_address: !secret esp-laundryenv_ip
current_ip_address: ${static_ip_address}
# Device Settings
log_level: "INFO"
update_interval: "60s"
#:########################################################################################:#
# PACKAGES:
# Included Common Packages
# https://esphome.io/components/packages.html
#:########################################################################################:#
packages:
#### WIFI, Network (Static/DHCP/IPV6 etc), Fallback AP, Safemode ####
common_wifi: !include
file: common/network_common.yaml
vars:
local_device_name: "${device_name}"
local_static_ip_address: "${static_ip_address}"
local_current_ip_address: "${current_ip_address}"
local_ota_pass: "${ota_pass}"
#### HOME ASSISTANT API (choose encryption or no encryption options) ####
common_api: !include
file: common/api_common.yaml
#file: common/api_common_noencryption.yaml
vars:
local_api_key: "${api_key}"
#### MQTT ####
common_mqtt: !include
file: common/mqtt_common.yaml
vars:
local_device_name: "${device_name}"
#### WEB PORTAL ####
#common_webportal: !include common/webportal_common.yaml
#### SNTP (Only use if you want/need accurate timeclocks) ####
#common_sntp: !include common/sntp_common.yaml
#### DIAGNOSTICS Sensors ####
diag_basic: !include common/include_basic_diag_sensors.yaml
diag_more: !include common/include_more_diag_sensors.yaml
#diag_debug: !include common/include_debug_diag_sensors.yaml
#diag_resetcount: !include common/include_resetcount_diag_sensors.yaml
#:########################################################################################:#
# ESPHOME:
# https://esphome.io/components/esphome.html
#:########################################################################################:#
esphome:
name: "${device_name}"
friendly_name: "${friendly_name}"
comment: "${description_comment}"
area: "${device_area}"
project:
name: "${project_name}"
version: "${project_version}"
#:########################################################################################:#
# ESP PLATFORM AND FRAMEWORK:
# https://esphome.io/components/esp8266.html
#:########################################################################################:#
esp8266:
board: esp01_1m
early_pin_init: false
board_flash_mode: dout
#:########################################################################################:#
# LOGGER:
# https://esphome.io/components/logger.html
#:########################################################################################:#
logger:
level: "${log_level}"
#baud_rate: 0
#esp8266_store_log_strings_in_flash: false
#tx_buffer_size: 64
#:########################################################################################:#
# SENSORS:
# https://esphome.io/components/sensor/
#:########################################################################################:#
sensor:
- platform: dht
pin: GPIO14
temperature:
name: "${entity_prefix} Temperature"
humidity:
name: "${entity_prefix} Humidity"
update_interval: "${update_interval}"
#:########################################################################################:#
# BINARY SENSORS:
# https://esphome.io/components/binary_sensor/
#:########################################################################################:#
binary_sensor:
- platform: gpio
pin:
number: GPIO13
mode:
input: true
pullup: false
name: "${entity_prefix} PIR"
device_class: motion
#filters:
# - invert:
- platform: gpio
pin:
number: GPIO5
mode:
input: true
pullup: true
inverted: true
name: "${entity_prefix} Smoke Detector"