mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
376 lines
10 KiB
YAML
376 lines
10 KiB
YAML
web_server:
|
|
port: 80
|
|
version: 3
|
|
include_internal: true
|
|
sorting_groups:
|
|
- id: sorting_group_temperature_settings
|
|
name: "Temperature Settings"
|
|
sorting_weight: 10
|
|
- id: sorting_group_humidity_settings
|
|
name: "Humidity Settings"
|
|
sorting_weight: 20
|
|
- id: sorting_group_pressure_settings
|
|
name: "Pressure Settings"
|
|
sorting_weight: 30
|
|
- id: sorting_group_quality_settings
|
|
name: "Quality Settings"
|
|
sorting_weight: 40
|
|
|
|
|
|
bme680_bsec:
|
|
i2c_id: ${i2c_id}
|
|
|
|
# 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_bsec
|
|
temperature:
|
|
# Temperature in °C
|
|
id: temperature
|
|
internal: true
|
|
sample_rate: lp
|
|
unit_of_measurement: "°F"
|
|
# Converting to farenheit here, to avoid decimals when viewing the sensor in home assistant
|
|
filters:
|
|
- lambda: return round( (x * (9.0/5.0) + 32.0) * 100.0) / 100.0;
|
|
web_server:
|
|
sorting_weight: 11
|
|
sorting_group_id: sorting_group_temperature_settings
|
|
|
|
humidity:
|
|
# Relative humidity %
|
|
id: humidity
|
|
internal: true
|
|
sample_rate: lp
|
|
unit_of_measurement: "%"
|
|
web_server:
|
|
sorting_weight: 21
|
|
sorting_group_id: sorting_group_humidity_settings
|
|
|
|
pressure:
|
|
# Pressure in hPa
|
|
id: pressure
|
|
internal: true
|
|
sample_rate: lp
|
|
unit_of_measurement: "hPa"
|
|
web_server:
|
|
sorting_weight: 31
|
|
sorting_group_id: sorting_group_pressure_settings
|
|
|
|
gas_resistance:
|
|
# Gas resistance in Ω
|
|
id: resistance
|
|
internal: true
|
|
unit_of_measurement: "Ω"
|
|
disabled_by_default: True
|
|
web_server:
|
|
sorting_weight: 41
|
|
sorting_group_id: sorting_group_pressure_settings
|
|
|
|
iaq:
|
|
# Indoor air quality value
|
|
id: iaq
|
|
internal: true
|
|
unit_of_measurement: "AQI"
|
|
web_server:
|
|
sorting_weight: 51
|
|
sorting_group_id: sorting_group_quality_settings
|
|
|
|
co2_equivalent:
|
|
# CO2 equivalent estimate in ppm
|
|
id: co2
|
|
internal: true
|
|
unit_of_measurement: "ppm"
|
|
web_server:
|
|
sorting_weight: 61
|
|
sorting_group_id: sorting_group_quality_settings
|
|
|
|
breath_voc_equivalent:
|
|
# Volatile organic compounds equivalent estimate in ppm
|
|
id: breath_voc
|
|
internal: true
|
|
unit_of_measurement: "ppm"
|
|
web_server:
|
|
sorting_weight: 71
|
|
sorting_group_id: sorting_group_quality_settings
|
|
|
|
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: 81
|
|
sorting_group_id: sorting_group_quality_settings
|
|
filters:
|
|
- median:
|
|
window_size: 20
|
|
send_every: 20
|
|
send_first_at: 1
|
|
|
|
# These source sensors update every 3 seconds
|
|
# An average with a window size of 10 and send_every of 10 means that an average is pushed out every 30 seconds
|
|
|
|
- platform: copy
|
|
source_id: temperature
|
|
device_class: temperature
|
|
unit_of_measurement: "°F"
|
|
name: "Air Temperature"
|
|
id: air_temperature
|
|
filters:
|
|
- sliding_window_moving_average:
|
|
window_size: 10
|
|
send_every: 10
|
|
send_first_at: 1
|
|
- or:
|
|
- heartbeat: 60s
|
|
- delta: 0.1
|
|
- lambda: 'return round( x * 10.0) / 10.0;'
|
|
web_server:
|
|
sorting_weight: 12
|
|
sorting_group_id: sorting_group_temperature_settings
|
|
|
|
# These derivatives attempt to calculate the change per minute
|
|
|
|
- platform: copy
|
|
source_id: temperature
|
|
unit_of_measurement: "°F"
|
|
name: "Air Temperature Change"
|
|
id: air_temperature_change
|
|
icon: mdi:chart-line
|
|
disabled_by_default: true
|
|
filters:
|
|
- lambda: |-
|
|
static float last_value = 0;
|
|
static float last_time = 0;
|
|
float time = (float) millis();
|
|
if (last_time == 0){
|
|
last_value = x;
|
|
last_time = time;
|
|
return {};
|
|
}
|
|
float change = ( ( x - last_value ) / ( time - last_time ) ) *1000*5;
|
|
last_value = x;
|
|
last_time = time;
|
|
return round( change * 100.0) / 100.0;
|
|
- or:
|
|
- heartbeat: 60s
|
|
- delta: 0.1
|
|
- sliding_window_moving_average:
|
|
window_size: 10
|
|
send_every: 10
|
|
send_first_at: 1
|
|
web_server:
|
|
sorting_weight: 13
|
|
sorting_group_id: sorting_group_temperature_settings
|
|
|
|
- platform: copy
|
|
source_id: humidity
|
|
device_class: humidity
|
|
unit_of_measurement: "%"
|
|
name: "Relative Humidity"
|
|
id: relative_humidity
|
|
filters:
|
|
- round: 2
|
|
- sliding_window_moving_average:
|
|
window_size: 10
|
|
send_every: 10
|
|
send_first_at: 1
|
|
- or:
|
|
- heartbeat: 60s
|
|
- delta: 0.1
|
|
web_server:
|
|
sorting_weight: 22
|
|
sorting_group_id: sorting_group_humidity_settings
|
|
|
|
- platform: copy
|
|
source_id: humidity
|
|
unit_of_measurement: "%"
|
|
name: "Relative Humidity Change"
|
|
id: relative_humidity_change
|
|
icon: mdi:chart-line
|
|
disabled_by_default: true
|
|
filters:
|
|
- lambda: |-
|
|
static float last_value = 0;
|
|
static float last_time = 0;
|
|
float time = (float) millis();
|
|
if (last_time == 0){
|
|
last_value = x;
|
|
last_time = time;
|
|
return {};
|
|
}
|
|
float change = ( ( x - last_value ) / ( time - last_time ) ) *1000*10;
|
|
last_value = x;
|
|
last_time = time;
|
|
return change;
|
|
- round: 2
|
|
- sliding_window_moving_average:
|
|
window_size: 10
|
|
send_every: 10
|
|
send_first_at: 1
|
|
- or:
|
|
- heartbeat: 60s
|
|
- delta: 0.1
|
|
web_server:
|
|
sorting_weight: 23
|
|
sorting_group_id: sorting_group_humidity_settings
|
|
|
|
- platform: copy
|
|
source_id: pressure
|
|
unit_of_measurement: "hPa"
|
|
name: "Pressure"
|
|
filters:
|
|
- sliding_window_moving_average:
|
|
window_size: 10
|
|
send_every: 10
|
|
send_first_at: 1
|
|
- round: 2
|
|
- or:
|
|
- heartbeat: 60s
|
|
- delta: 0.1
|
|
web_server:
|
|
sorting_group_id: sorting_group_pressure_settings
|
|
|
|
- platform: copy
|
|
source_id: resistance
|
|
unit_of_measurement: "Ω"
|
|
name: "Gas Resistance"
|
|
filters:
|
|
- sliding_window_moving_average:
|
|
window_size: 10
|
|
send_every: 10
|
|
send_first_at: 1
|
|
- round: 2
|
|
- or:
|
|
- heartbeat: 60s
|
|
- delta: 0.1
|
|
web_server:
|
|
sorting_group_id: sorting_group_pressure_settings
|
|
|
|
- platform: copy
|
|
source_id: iaq
|
|
unit_of_measurement: "AQI"
|
|
name: "Air Quality Index"
|
|
filters:
|
|
- sliding_window_moving_average:
|
|
window_size: 10
|
|
send_every: 10
|
|
send_first_at: 1
|
|
- round: 2
|
|
- or:
|
|
- heartbeat: 60s
|
|
- delta: 0.1
|
|
web_server:
|
|
sorting_group_id: sorting_group_quality_settings
|
|
|
|
- platform: copy
|
|
source_id: co2
|
|
unit_of_measurement: "ppm"
|
|
name: "CO2 Equivalent"
|
|
filters:
|
|
- sliding_window_moving_average:
|
|
window_size: 10
|
|
send_every: 10
|
|
send_first_at: 1
|
|
- round: 2
|
|
- or:
|
|
- heartbeat: 60s
|
|
- delta: 0.1
|
|
web_server:
|
|
sorting_group_id: sorting_group_quality_settings
|
|
|
|
- platform: copy
|
|
source_id: breath_voc
|
|
unit_of_measurement: "ppm"
|
|
name: "Breath VOC Equivalent"
|
|
filters:
|
|
- sliding_window_moving_average:
|
|
window_size: 10
|
|
send_every: 10
|
|
send_first_at: 1
|
|
- round: 2
|
|
- or:
|
|
- heartbeat: 60s
|
|
- delta: 0.1
|
|
web_server:
|
|
sorting_group_id: sorting_group_quality_settings
|
|
|
|
text_sensor:
|
|
- platform: template
|
|
name: "IAQ Classification"
|
|
icon: "mdi:checkbox-marked-circle-outline"
|
|
web_server:
|
|
sorting_weight: 60
|
|
sorting_group_id: sorting_group_quality_settings
|
|
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
|
|
sorting_group_id: sorting_group_quality_settings |