mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-28 05:33:53 +00:00 
			
		
		
		
	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>
		
			
				
	
	
		
			62 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			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
 |