mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	Add configuration flow abilites to the ld2410 component (#4434)
This commit is contained in:
		
							
								
								
									
										149
									
								
								tests/test1.yaml
									
									
									
									
									
								
							
							
						
						
									
										149
									
								
								tests/test1.yaml
									
									
									
									
									
								
							| @@ -170,6 +170,9 @@ mqtt: | ||||
|                 id: uart_0 | ||||
|                 data: !lambda |- | ||||
|                   return {}; | ||||
|             - bluetooth_password.set: | ||||
|                 id: my_ld2410 | ||||
|                 password: abcdef | ||||
|   on_connect: | ||||
|     - light.turn_on: ${roomname}_lights | ||||
|     - mqtt.publish: | ||||
| @@ -1333,16 +1336,64 @@ sensor: | ||||
|     speed: | ||||
|       name: "Radiator Pump Speed" | ||||
|   - platform: ld2410 | ||||
|     light: | ||||
|       name: light | ||||
|     moving_distance: | ||||
|       name: "Moving distance (cm)" | ||||
|     still_distance: | ||||
|       name: "Still Distance (cm)" | ||||
|     moving_energy: | ||||
|       name: "Move Energy" | ||||
|       name: "Move Energy (%)" | ||||
|     still_energy: | ||||
|       name: "Still Energy" | ||||
|       name: "Still Energy (%)" | ||||
|     detection_distance: | ||||
|       name: "Distance Detection" | ||||
|       name: "Distance Detection (cm)" | ||||
|     g0: | ||||
|       move_energy: | ||||
|         name: g0 move energy | ||||
|       still_energy: | ||||
|         name: g0 still energy | ||||
|     g1: | ||||
|       move_energy: | ||||
|         name: g1 move energy | ||||
|       still_energy: | ||||
|         name: g1 still energy | ||||
|     g2: | ||||
|       move_energy: | ||||
|         name: g2 move energy | ||||
|       still_energy: | ||||
|         name: g2 still energy | ||||
|     g3: | ||||
|       move_energy: | ||||
|         name: g3 move energy | ||||
|       still_energy: | ||||
|         name: g3 still energy | ||||
|     g4: | ||||
|       move_energy: | ||||
|         name: g4 move energy | ||||
|       still_energy: | ||||
|         name: g4 still energy | ||||
|     g5: | ||||
|       move_energy: | ||||
|         name: g5 move energy | ||||
|       still_energy: | ||||
|         name: g5 still energy | ||||
|     g6: | ||||
|       move_energy: | ||||
|         name: g6 move energy | ||||
|       still_energy: | ||||
|         name: g6 still energy | ||||
|     g7: | ||||
|       move_energy: | ||||
|         name: g7 move energy | ||||
|       still_energy: | ||||
|         name: g7 still energy | ||||
|     g8: | ||||
|       move_energy: | ||||
|         name: g8 move energy | ||||
|       still_energy: | ||||
|         name: g8 still energy | ||||
|  | ||||
|   - platform: sen21231 | ||||
|     name: "Person Sensor" | ||||
|     i2c_id: i2c_bus | ||||
| @@ -1684,6 +1735,8 @@ binary_sensor: | ||||
|       name: movement | ||||
|     has_still_target: | ||||
|       name: still | ||||
|     out_pin_presence_status: | ||||
|       name: out pin presence status | ||||
|  | ||||
| pca9685: | ||||
|   frequency: 500 | ||||
| @@ -2626,6 +2679,11 @@ switch: | ||||
|     id: outlet_switch | ||||
|     optimistic: true | ||||
|     device_class: outlet | ||||
|   - platform: ld2410 | ||||
|     engineering_mode: | ||||
|       name: "control ld2410 engineering mode" | ||||
|     bluetooth: | ||||
|       name: "control ld2410 bluetooth" | ||||
|  | ||||
| fan: | ||||
|   - platform: binary | ||||
| @@ -3207,6 +3265,11 @@ text_sensor: | ||||
|     tag_name: OPTARIF | ||||
|     name: optarif | ||||
|     teleinfo_id: myteleinfo | ||||
|   - platform: ld2410 | ||||
|     version: | ||||
|       name: "presenece sensor version" | ||||
|     mac_address: | ||||
|       name: "presenece sensor mac address" | ||||
|  | ||||
| sn74hc595: | ||||
|   - id: sn74hc595_hub | ||||
| @@ -3311,6 +3374,61 @@ number: | ||||
|     step: 1 | ||||
|     max_value: 10 | ||||
|     optimistic: true | ||||
|   - platform: ld2410 | ||||
|     light_threshold: | ||||
|       name: light threshold | ||||
|     timeout: | ||||
|       name: timeout | ||||
|     max_move_distance_gate: | ||||
|       name: max move distance gate | ||||
|     max_still_distance_gate: | ||||
|       name: max still distance gate | ||||
|     g0: | ||||
|       move_threshold: | ||||
|         name: g0 move threshold | ||||
|       still_threshold: | ||||
|         name: g0 still threshold | ||||
|     g1: | ||||
|       move_threshold: | ||||
|         name: g1 move threshold | ||||
|       still_threshold: | ||||
|         name: g1 still threshold | ||||
|     g2: | ||||
|       move_threshold: | ||||
|         name: g2 move threshold | ||||
|       still_threshold: | ||||
|         name: g2 still threshold | ||||
|     g3: | ||||
|       move_threshold: | ||||
|         name: g3 move threshold | ||||
|       still_threshold: | ||||
|         name: g3 still threshold | ||||
|     g4: | ||||
|       move_threshold: | ||||
|         name: g4 move threshold | ||||
|       still_threshold: | ||||
|         name: g4 still threshold | ||||
|     g5: | ||||
|       move_threshold: | ||||
|         name: g5 move threshold | ||||
|       still_threshold: | ||||
|         name: g5 still threshold | ||||
|     g6: | ||||
|       move_threshold: | ||||
|         name: g6 move threshold | ||||
|       still_threshold: | ||||
|         name: g6 still threshold | ||||
|     g7: | ||||
|       move_threshold: | ||||
|         name: g7 move threshold | ||||
|       still_threshold: | ||||
|         name: g7 still threshold | ||||
|     g8: | ||||
|       move_threshold: | ||||
|         name: g8 move threshold | ||||
|       still_threshold: | ||||
|         name: g8 still threshold | ||||
|  | ||||
|  | ||||
| select: | ||||
|   - platform: template | ||||
| @@ -3324,6 +3442,15 @@ select: | ||||
|   - platform: copy | ||||
|     source_id: test_select | ||||
|     name: Test Select Copy | ||||
|   - platform: ld2410 | ||||
|     distance_resolution: | ||||
|       name: distance resolution | ||||
|     baud_rate: | ||||
|       name: baud rate | ||||
|     light_function: | ||||
|       name: light function | ||||
|     out_pin_level: | ||||
|       name: out ping level | ||||
|  | ||||
| qr_code: | ||||
|   - id: homepage_qr | ||||
| @@ -3386,19 +3513,17 @@ button: | ||||
|     name: Midea Power Inverse | ||||
|     on_press: | ||||
|       midea_ac.power_toggle: | ||||
|   - platform: ld2410 | ||||
|     factory_reset: | ||||
|       name: "factory reset" | ||||
|     restart: | ||||
|       name: "restart" | ||||
|     query_params: | ||||
|       name: query params | ||||
|  | ||||
| ld2410: | ||||
|   id: my_ld2410 | ||||
|   uart_id: ld2410_uart | ||||
|   timeout: 150s | ||||
|   max_move_distance: 6m | ||||
|   max_still_distance: 0.75m | ||||
|   g0_move_threshold: 10 | ||||
|   g0_still_threshold: 20 | ||||
|   g2_move_threshold: 20 | ||||
|   g2_still_threshold: 21 | ||||
|   g8_move_threshold: 80 | ||||
|   g8_still_threshold: 81 | ||||
|  | ||||
| lcd_menu: | ||||
|   display_id: my_lcd_gpio | ||||
|   | ||||
		Reference in New Issue
	
	Block a user