mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 10:30:14 -04:00
235 lines
5.7 KiB
YAML
235 lines
5.7 KiB
YAML
substitutions:
|
|
devicename: utility-room-multisensor
|
|
entity_name: utility_room_multisensor
|
|
friendly_name: Utility Room MultiSensor
|
|
comment: Clever MultiSensor
|
|
platform: ESP8266
|
|
board: d1_mini
|
|
static_ip: !secret utility-room-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 |