Modularize and move all to kungle-oss.
This commit is contained in:
40
_data/.weather.yaml
Normal file
40
_data/.weather.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
i2c:
|
||||
sda: 4
|
||||
scl: 5
|
||||
scan: true
|
||||
id: bus_a
|
||||
|
||||
sensor:
|
||||
- platform: bme280
|
||||
temperature:
|
||||
name: Temp${dn}
|
||||
id: bme280_temperature
|
||||
pressure:
|
||||
name: Press${dn}
|
||||
id: bme280_pressure
|
||||
humidity:
|
||||
name: HumidityRel${dn}
|
||||
id: bme280_humidity
|
||||
address: 0x76
|
||||
update_interval: 15s
|
||||
# Templates from https://esphome.io/cookbook/bme280_environment.html
|
||||
- platform: template
|
||||
name: HumidityAbs${dn}
|
||||
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(bme280_temperature).state) /
|
||||
(id(bme280_temperature).state + 243.5)) * id(bme280_humidity).state * mw) /
|
||||
((273.15 + id(bme280_temperature).state) * r); // in grams/m^3
|
||||
accuracy_decimals: 2
|
||||
update_interval: 15s
|
||||
icon: 'mdi:water'
|
||||
unit_of_measurement: 'g/m³'
|
||||
- platform: template
|
||||
name: DewPt${dn}
|
||||
lambda: |-
|
||||
return (243.5*(log(id(bme280_humidity).state/100)+((17.67*id(bme280_temperature).state)/
|
||||
(243.5+id(bme280_temperature).state)))/(17.67-log(id(bme280_humidity).state/100)-
|
||||
((17.67*id(bme280_temperature).state)/(243.5+id(bme280_temperature).state))));
|
||||
unit_of_measurement: °C
|
||||
icon: 'mdi:thermometer-alert'
|
||||
Reference in New Issue
Block a user