More and more small fixes

This commit is contained in:
CeeWeasel
2025-11-14 16:46:44 -05:00
parent 8a02905888
commit 2e0a197b4d
33 changed files with 668 additions and 214 deletions
+235
View File
@@ -0,0 +1,235 @@
substitutions:
devicename: bathroom-multisensor
entity_name: bathroom_multisensor
friendly_name: Bathroom MultiSensor
comment: Clever MultiSensor
platform: ESP8266
board: nodemcu
static_ip: !secret bathroom-multisensor-ip
packages:
network: !include common/wifi.yaml
device_base: !include common/device_base.yaml
esphome:
name: ${devicename}
friendly_name: ${friendly_name}
name_add_mac_suffix: false
esp8266:
board: ${board}
# Enable logging
logger:
#level: VERBOSE
web_server:
port: 80
version: 3
include_internal: True
i2c:
- id: bus_a
sda: D2
scl: D1
bme680_bsec:
i2c_id: bus_a
# i2c address
# -----------
# Common values are:
# - 0x76
# - 0x77
# Default: 0x76
address: 0x77
# Temperature offset
# ------------------
# Useful if device is in enclosure and reads too high
# Default: 0
temperature_offset: 0
# IAQ calculation mode
# --------------------
# Available options:
# - static (for fixed position devices)
# - mobile (for on person or other moveable devices)
# Default: static
iaq_mode: static
# Sample rate
# -----------
# This controls the sampling rate for gas-dependant sensors and will govern the interval
# at which the sensor heater is operated.
# By default this rate will also be used for temperature, pressure and humidity sensors
# but these can be overridden on a per-sensor level if required.
#
# Available options:
# - lp (low power - samples every 3 seconds)
# - ulp (ultra low power - samples every 5 minutes)
# Default: lp
sample_rate: lp
# Interval at which to save BSEC state
# ------------------------------------
# Default: 6h
state_save_interval: 6h
sensor:
# - platform: bme680
# i2c_id: bus_a
# address: 0x77
# update_interval: 3s
# temperature:
# name: "Standard Temperature"
# oversampling: 16x
# device_class: temperature
# unit_of_measurement: "°C"
# web_server:
# sorting_weight: 10
# pressure:
# name: "Standard Pressure"
# device_class: atmospheric_pressure
# unit_of_measurement: hPa
# web_server:
# sorting_weight: 20
# humidity:
# id: "humidity"
# name: "Standard Humidity"
# device_class: humidity
# unit_of_measurement: "%"
# web_server:
# sorting_weight: 30
# gas_resistance:
# id: "gas_resistance"
# name: "Standard Gas Resistance"
# unit_of_measurement: "Ω"
# web_server:
# sorting_weight: 40
# - platform: template
# name: "Standard Indoor Air Quality"
# id: iaq
# icon: "mdi:gauge"
# # calculation: comp_gas = log(R_gas[ohm]) + 0.04 log(Ohm)/%rh * hum[%rh]
# lambda: |-
# return log(id(gas_resistance).state) + 0.04 * id(humidity).state;
# state_class: "measurement"
# web_server:
# sorting_weight: 50
- platform: bme680_bsec
temperature:
# Temperature in °C
name: "Temperature"
id: temp
sample_rate: lp
unit_of_measurement: "°C"
web_server:
sorting_weight: 11
filters:
- median
pressure:
# Pressure in hPa
name: "Pressure"
id: pressure
sample_rate: lp
unit_of_measurement: "hPa"
web_server:
sorting_weight: 21
filters:
- median
humidity:
# Relative humidity %
id: humidity
name: "Relative Humidity"
sample_rate: lp
unit_of_measurement: "%"
web_server:
sorting_weight: 31
filters:
- median
gas_resistance:
# Gas resistance in Ω
name: "Gas Resistance"
id: gas_resistance
unit_of_measurement: "Ω"
disabled_by_default: True
web_server:
sorting_weight: 41
filters:
- median
iaq:
# Indoor air quality value
name: "Air Quality Index"
unit_of_measurement: "AQI"
id: iaq
web_server:
sorting_weight: 51
filters:
- median
iaq_accuracy:
# IAQ accuracy as a numeric value of 0, 1, 2, 3
name: "Numeric IAQ Accuracy"
id: iaq_accuracy
disabled_by_default: True
web_server:
sorting_weight: 71
co2_equivalent:
# CO2 equivalent estimate in ppm
name: "CO2 Equivalent"
id: co2
unit_of_measurement: "ppm"
web_server:
sorting_weight: 81
filters:
- median
breath_voc_equivalent:
# Volatile organic compounds equivalent estimate in ppm
name: "Breath VOC Equivalent"
id: breath_voc
unit_of_measurement: "ppm"
web_server:
sorting_weight: 91
filters:
- median
text_sensor:
- platform: template
name: "IAQ Classification"
icon: "mdi:checkbox-marked-circle-outline"
web_server:
sorting_weight: 60
lambda: |-
if (int(id(iaq).state) <= 50) {
return {"Excellent"};
}
else if (int(id(iaq).state) <= 100) {
return {"Good"};
}
else if (int(id(iaq).state) <= 150) {
return {"Lightly polluted"};
}
else if (int(id(iaq).state) <= 200) {
return {"Moderately polluted"};
}
else if (int(id(iaq).state) <= 250) {
return {"Heavily polluted"};
}
else if (int(id(iaq).state) <= 350) {
return {"Severely polluted"};
}
else if (int(id(iaq).state) <= 500) {
return {"Extremely polluted"};
}
else {
return {"unknown"};
}
- platform: bme680_bsec
iaq_accuracy:
# IAQ accuracy as a text value of Stabilizing, Uncertain, Calibrating, Calibrated
name: "AQI Accuracy"
web_server:
sorting_weight: 61
+24
View File
@@ -0,0 +1,24 @@
# Specifications:
# Working range: 1-25L/min
# Max water pressure: 1.75Mpa
# F=11Q(L/min)
# Working Voltage Range: DC5-15V
# Accuracy:±3%
# Temperature sensor: NTC 3950 R25=50K
# Male Thread External Diameter:20.5mm(0.8 inch)
# Tube Length:65mm(2.56 inch)
# Cable Length:30cm(11.81 inch)
# Temperature Sensor Length:16mm(0.63 inch)
# Size:65mm*30mm*28mm(L*W*H)
# Package Include:
# Flow meter x 1
sensor:
- platform: pulse_counter
pin: GPIO5
name: "Pulse Counter"
update_interval: 5s
filters:
- lambda: return (x / 11.0) * 60.0;
unit_of_measurement: "L/hr"
@@ -0,0 +1,27 @@
esp32:
board: esp32-s3
framework:
#type: arduino
type: esp-idf
ethernet:
id: eth
type: W5500
clk_pin: GPIO13
mosi_pin: GPIO11
miso_pin: GPIO12
cs_pin: GPIO14
interrupt_pin: GPIO10
reset_pin: GPIO9
use_address: ${devicename}.local
manual_ip:
static_ip: ${static_ip}
gateway: !secret iot_default_gateway
subnet: !secret iot_subnet_mask
dns1: !secret iot_default_dns1
dns2: !secret iot_default_dns2
text_sensor:
- <<: !include text_sensor/ethernet_info.config.yaml
+3 -3
View File
@@ -4,7 +4,7 @@ substitutions:
friendly_name: Utility Room MultiSensor
comment: Clever MultiSensor
platform: ESP8266
board: d1_mini
board: nodemcu
static_ip: !secret utility-room-multisensor-ip
packages:
@@ -30,8 +30,8 @@ web_server:
i2c:
- id: bus_a
sda: D2
scl: D1
sda: D6
scl: D5
bme680_bsec:
i2c_id: bus_a