mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-25 13:13:48 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			42 lines
		
	
	
		
			908 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			908 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| sensor:
 | |
|   - platform: template
 | |
|     id: template_sensor
 | |
|     name: Template Sensor
 | |
|     lambda: |-
 | |
|       if (millis() > 10000) {
 | |
|         return 42.0;
 | |
|       }
 | |
|       return 0.0;
 | |
|     update_interval: 15s
 | |
| 
 | |
| binary_sensor:
 | |
|   - platform: analog_threshold
 | |
|     name: Analog Threshold 1
 | |
|     sensor_id: template_sensor
 | |
|     threshold:
 | |
|       upper: 110
 | |
|       lower: 90
 | |
|     filters:
 | |
|       - delayed_on: 0s
 | |
|       - delayed_off: 10s
 | |
|   - platform: analog_threshold
 | |
|     name: Analog Threshold 2
 | |
|     sensor_id: template_sensor
 | |
|     threshold: 100
 | |
|     filters:
 | |
|       - invert:
 | |
|   - platform: analog_threshold
 | |
|     name: Analog Threshold 3
 | |
|     sensor_id: template_sensor
 | |
|     threshold: !lambda return 100;
 | |
|     filters:
 | |
|       - invert:
 | |
|   - platform: analog_threshold
 | |
|     name: Analog Threshold 4
 | |
|     sensor_id: template_sensor
 | |
|     threshold:
 | |
|       upper: !lambda return 110;
 | |
|       lower: !lambda return 90;
 | |
|     filters:
 | |
|       - invert:
 |