1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 11:22:24 +01:00
Files
esphome/tests/components/binary_sensor_map/common.yaml
DanielV b18ff48b4a [API] Sub devices and areas (#8544)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick+github@koston.org>
2025-06-25 12:03:41 +00:00

62 lines
1.3 KiB
YAML

binary_sensor:
- platform: template
id: bin1
lambda: |-
if (millis() > 10000) {
return true;
} else {
return false;
}
- platform: template
id: bin2
lambda: |-
if (millis() > 20000) {
return true;
} else {
return false;
}
- platform: template
id: bin3
lambda: |-
if (millis() > 30000) {
return true;
} else {
return false;
}
sensor:
- platform: binary_sensor_map
name: Binary Sensor Map Group
type: group
channels:
- binary_sensor: bin1
value: 10.0
- binary_sensor: bin2
value: 15.0
- binary_sensor: bin3
value: 100.0
- platform: binary_sensor_map
name: Binary Sensor Map Sum
type: sum
channels:
- binary_sensor: bin1
value: 10.0
- binary_sensor: bin2
value: 15.0
- binary_sensor: bin3
value: 100.0
- platform: binary_sensor_map
name: Binary Sensor Map Bayesian
type: bayesian
prior: 0.4
observations:
- binary_sensor: bin1
prob_given_true: 0.9
prob_given_false: 0.4
- binary_sensor: bin2
prob_given_true: 0.7
prob_given_false: 0.05
- binary_sensor: bin3
prob_given_true: 0.8
prob_given_false: 0.2