mirror of
https://github.com/esphome/esphome.git
synced 2024-12-27 07:51:43 +01:00
76 lines
2.1 KiB
YAML
76 lines
2.1 KiB
YAML
sensor:
|
|
- platform: template
|
|
id: template_temperature1
|
|
lambda: |-
|
|
if (millis() > 10000) {
|
|
return 0.6;
|
|
} else {
|
|
return 0.0;
|
|
}
|
|
- platform: template
|
|
id: template_temperature2
|
|
lambda: |-
|
|
if (millis() > 20000) {
|
|
return 0.8;
|
|
} else {
|
|
return 0.0;
|
|
}
|
|
- platform: combination
|
|
type: kalman
|
|
name: Kalman-filtered temperature
|
|
process_std_dev: 0.00139
|
|
sources:
|
|
- source: template_temperature1
|
|
error: !lambda "return 0.4 + std::abs(x - 25) * 0.023;"
|
|
- source: template_temperature2
|
|
error: 1.5
|
|
- platform: combination
|
|
type: linear
|
|
name: Linearly combined temperatures
|
|
sources:
|
|
- source: template_temperature1
|
|
coeffecient: !lambda "return 0.4 + std::abs(x - 25) * 0.023;"
|
|
- source: template_temperature2
|
|
coeffecient: 1.5
|
|
- platform: combination
|
|
type: max
|
|
name: Max of combined temperatures
|
|
sources:
|
|
- source: template_temperature1
|
|
- source: template_temperature2
|
|
- platform: combination
|
|
type: mean
|
|
name: Mean of combined temperatures
|
|
sources:
|
|
- source: template_temperature1
|
|
- source: template_temperature2
|
|
- platform: combination
|
|
type: median
|
|
name: Median of combined temperatures
|
|
sources:
|
|
- source: template_temperature1
|
|
- source: template_temperature2
|
|
- platform: combination
|
|
type: min
|
|
name: Min of combined temperatures
|
|
sources:
|
|
- source: template_temperature1
|
|
- source: template_temperature2
|
|
- platform: combination
|
|
type: most_recently_updated
|
|
name: Most recently updated of combined temperatures
|
|
sources:
|
|
- source: template_temperature1
|
|
- source: template_temperature2
|
|
- platform: combination
|
|
type: range
|
|
name: Range of combined temperatures
|
|
sources:
|
|
- source: template_temperature1
|
|
- source: template_temperature2
|
|
- platform: combination
|
|
type: sum
|
|
name: Sum of combined temperatures
|
|
sources:
|
|
- source: template_temperature1
|
|
- source: template_temperature2
|