Wetterstation v2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.7 KiB

# BME280 Temperature+Pressure+Humidity Sensor
sensor:
- platform: bme280
temperature:
name: "${node_name} Temperature"
id: temperature
pressure:
name: "${node_name} Pressure"
id: pressure
humidity:
name: "${node_name} Humidity"
id: humidity
address: 0x77
update_interval: 60s
- platform: template
name: "${node_name} Equivalent sea level pressure"
id: pressure_sealevel
lambda: |-
const float STANDARD_ALTITUDE = ${altitude}; // in meters, see note
return id(pressure).state / powf(1 - ((0.0065 * STANDARD_ALTITUDE) /
(id(temperature).state + (0.0065 * STANDARD_ALTITUDE) + 273.15)), 5.257); // in hPa
update_interval: 60s
unit_of_measurement: 'hPa'
- platform: template
name: "${node_name} Absolute Humidity"
lambda: |-
const float mw = 18.01534; // molar mass of water g/mol
const float r = 8.31447215; // Universal gas constant J/mol/K
return (6.112 * powf(2.718281828, (17.67 * id(temperature).state) /
(id(temperature).state + 243.5)) * id(humidity).state * mw) /
((273.15 + id(temperature).state) * r); // in grams/m^3
accuracy_decimals: 2
update_interval: 60s
icon: 'mdi:water'
unit_of_measurement: 'g/m³'
- platform: template
name: "${node_name} Dew Point"
lambda: |-
return (243.5*(log(id(humidity).state/100)+((17.67*id(temperature).state)/
(243.5+id(temperature).state)))/(17.67-log(id(humidity).state/100)-
((17.67*id(temperature).state)/(243.5+id(temperature).state))));
accuracy_decimals: 1
update_interval: 60s
unit_of_measurement: °C
icon: 'mdi:thermometer-alert'