mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 15:12:06 +00:00 
			
		
		
		
	Add Current based cover (#1439)
* Adding first version of current_base cover. No Interlock yet. * simplifying code * Implementing malfunction protection * Adding test * Fixing too long lines * Fixing test sensor names * Adding missing id's in ade7953 tests * Adding code owners as requested * Fixing issue setting position when stop reached * Fixing issue setting position when stop reached * Black formatting * Fixing format issues * Fix for concurrent changes Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							1ba560dc9e
						
					
				
				
					commit
					e30f17f64f
				
			| @@ -426,14 +426,19 @@ sensor: | ||||
|     irq_pin: GPIO16 | ||||
|     voltage: | ||||
|       name: ADE7953 Voltage | ||||
|       id: ade7953_voltage | ||||
|     current_a: | ||||
|       name: ADE7953 Current A | ||||
|       id: ade7953_current_a | ||||
|     current_b: | ||||
|       name: ADE7953 Current B | ||||
|       id: ade7953_current_b | ||||
|     active_power_a: | ||||
|       name: ADE7953 Active Power A | ||||
|       id: ade7953_active_power_a | ||||
|     active_power_b: | ||||
|       name: ADE7953 Active Power B | ||||
|       id: ade7953_active_power_b | ||||
|   - platform: pzem004t | ||||
|     uart_id: uart3 | ||||
|     voltage: | ||||
| @@ -1021,6 +1026,29 @@ cover: | ||||
|     close_action: | ||||
|       - switch.turn_on: gpio_switch2 | ||||
|     close_duration: 4.5min | ||||
|   - platform: current_based | ||||
|     name: "Current Based Cover" | ||||
|     open_sensor: ade7953_current_a | ||||
|     open_moving_current_threshold: 0.5 | ||||
|     open_obstacle_current_threshold: 0.8 | ||||
|     open_duration: 12s | ||||
|     open_action: | ||||
|       - switch.turn_on: gpio_switch1 | ||||
|     close_sensor: ade7953_current_b | ||||
|     close_moving_current_threshold: 0.5 | ||||
|     close_obstacle_current_threshold: 0.8 | ||||
|     close_duration: 10s | ||||
|     close_action: | ||||
|       - switch.turn_on: gpio_switch2 | ||||
|     stop_action: | ||||
|       - switch.turn_off: gpio_switch1 | ||||
|       - switch.turn_off: gpio_switch2 | ||||
|     obstacle_rollback: 30% | ||||
|     start_sensing_delay: 0.8s | ||||
|     malfunction_detection: true | ||||
|     malfunction_action: | ||||
|       then: | ||||
|         - logger.log: "Malfunction Detected" | ||||
|   - platform: template | ||||
|     name: Template Cover with Tilt | ||||
|     tilt_lambda: 'return 0.5;' | ||||
|   | ||||
		Reference in New Issue
	
	Block a user