more esphome devices and fixes
This commit is contained in:
+105
-63
@@ -1,39 +1,78 @@
|
||||
#############################################
|
||||
#############################################
|
||||
# LAUNDRY ENVIRONMENT - SONOFF DEV
|
||||
#:########################################################################################:#
|
||||
# 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
|
||||
#############################################
|
||||
# Sonoff Dev
|
||||
# https://wiki.iteadstudio.com/Sonoff_DEV
|
||||
#:########################################################################################:#
|
||||
# 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
|
||||
#
|
||||
# NOTES
|
||||
# -
|
||||
# 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
|
||||
#:########################################################################################:#
|
||||
|
||||
#############################################
|
||||
# SPECIFIC DEVICE VARIABLE SUBSTITUTIONS
|
||||
#:########################################################################################:#
|
||||
# SUBSTITUTIONS:
|
||||
# Specific device variable substitutions
|
||||
# If NOT using a secrets file, just replace these with the passwords etc (in quotes)
|
||||
#############################################
|
||||
#:########################################################################################:#
|
||||
substitutions:
|
||||
device_name: "esp-laundryenv" # Reference name for the device in the system.
|
||||
project_name: "Sonoff Technologies.Sonoff DEV" # Project Details
|
||||
project_version: "v1" # Project V denotes release of yaml file, allowing checking of deployed vs latest version
|
||||
entity_prefix: "Laundry" # Simple device name where we want to prefix a sensor or switch, eg "Load" Current.
|
||||
# Device Naming
|
||||
device_name: "esp-laundryenv"
|
||||
friendly_name: "Laundry Environment"
|
||||
description_comment: "Laundry Environment Sensor, PIR and Smoke Detector using Sonoff DEV"
|
||||
device_area: "Laundry" # Allows ESP device to be automatically linked to an 'Area' in Home Assistant.
|
||||
api_key: !secret esp-laundryenv_api_key # unfortunately you can't use substitutions inside secrets names
|
||||
ota_pass: !secret esp-laundryenv_ota_pass # unfortunately you can't use substitutions inside secrets names
|
||||
static_ip_address: !secret esp-laundryenv_ip
|
||||
log_level: "INFO" # Define logging level: NONE, ERROR, WARN, INFO, DEBUG (Default), VERBOSE, VERY_VERBOSE
|
||||
update_interval: "60s" # update time for for general sensors etc
|
||||
description_comment: "Laundry Environment Sensor, PIR and Smoke Detector using Sonoff DEV (Layout V1.1)"
|
||||
device_area: "Laundry"
|
||||
|
||||
##########################################################################################
|
||||
# PACKAGES: Included Common Packages
|
||||
# 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
|
||||
@@ -41,6 +80,7 @@ packages:
|
||||
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) ####
|
||||
@@ -55,63 +95,68 @@ packages:
|
||||
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
|
||||
#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
|
||||
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
|
||||
#:########################################################################################:#
|
||||
# ESPHOME:
|
||||
# https://esphome.io/components/esphome.html
|
||||
#############################################
|
||||
#:########################################################################################:#
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
friendly_name: "${friendly_name}"
|
||||
comment: "${description_comment}" # Appears on the esphome page in HA
|
||||
comment: "${description_comment}"
|
||||
area: "${device_area}"
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
|
||||
#############################################
|
||||
# ESP Platform and Framework
|
||||
# https://esphome.io/components/esp32.html
|
||||
#############################################
|
||||
#:########################################################################################:#
|
||||
# ESP PLATFORM AND FRAMEWORK:
|
||||
# https://esphome.io/components/esp8266.html
|
||||
#:########################################################################################:#
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
early_pin_init: False # Initialise pins early to known values. Recommended false where switches are involved. Defaults to True.
|
||||
board_flash_mode: dout # Default is dout
|
||||
early_pin_init: false
|
||||
board_flash_mode: dout
|
||||
|
||||
#############################################
|
||||
# ESPHome Logging Enable
|
||||
#:########################################################################################:#
|
||||
# LOGGER:
|
||||
# https://esphome.io/components/logger.html
|
||||
#############################################
|
||||
#:########################################################################################:#
|
||||
logger:
|
||||
level: ${log_level} #INFO Level suggested, or DEBUG for testing
|
||||
#baud_rate: 0 #set to 0 for no logging via UART, needed if you are using it for other serial things (eg PZEM)
|
||||
level: "${log_level}"
|
||||
#baud_rate: 0
|
||||
#esp8266_store_log_strings_in_flash: false
|
||||
#tx_buffer_size: 64
|
||||
|
||||
#############################################
|
||||
# SENSORS
|
||||
# https://esphome.io/components/binary_sensor/
|
||||
#############################################
|
||||
#:########################################################################################:#
|
||||
# SENSORS:
|
||||
# https://esphome.io/components/sensor/
|
||||
#:########################################################################################:#
|
||||
sensor:
|
||||
- platform: dht
|
||||
pin: GPIO14
|
||||
temperature:
|
||||
name: ${entity_prefix} Temperature
|
||||
name: "${entity_prefix} Temperature"
|
||||
humidity:
|
||||
name: ${entity_prefix} Humidity
|
||||
update_interval: ${update_interval}
|
||||
name: "${entity_prefix} Humidity"
|
||||
update_interval: "${update_interval}"
|
||||
|
||||
#:########################################################################################:#
|
||||
# BINARY SENSORS:
|
||||
# https://esphome.io/components/binary_sensor/
|
||||
#:########################################################################################:#
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
@@ -119,19 +164,16 @@ binary_sensor:
|
||||
mode:
|
||||
input: true
|
||||
pullup: false
|
||||
name: ${entity_prefix} PIR
|
||||
name: "${entity_prefix} PIR"
|
||||
device_class: motion
|
||||
#filters:
|
||||
# - invert:
|
||||
# - invert:
|
||||
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO05
|
||||
number: GPIO5
|
||||
mode:
|
||||
input: true
|
||||
pullup: true
|
||||
inverted: True
|
||||
name: ${entity_prefix} Smoke Detector
|
||||
|
||||
|
||||
|
||||
inverted: true
|
||||
name: "${entity_prefix} Smoke Detector"
|
||||
Reference in New Issue
Block a user