mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 15:12:06 +00:00 
			
		
		
		
	Consolidate test files where all tests are identical (#6690)
This commit is contained in:
		
							
								
								
									
										41
									
								
								tests/components/esp32_ble_tracker/common.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								tests/components/esp32_ble_tracker/common.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,41 @@ | ||||
| esphome: | ||||
|   on_boot: | ||||
|     then: | ||||
|       - esp32_ble_tracker.start_scan | ||||
|       - esp32_ble_tracker.stop_scan | ||||
|  | ||||
| esp32_ble_tracker: | ||||
|   on_ble_advertise: | ||||
|     - mac_address: | ||||
|         - AA:BB:CC:DD:EE:FF | ||||
|         - FF:EE:DD:CC:BB:AA | ||||
|       then: | ||||
|         # yamllint disable rule:line-length | ||||
|         - lambda: !lambda |- | ||||
|             ESP_LOGD("main", "The device address (%s) exists in list", x.address_str().c_str()); | ||||
|         # yamllint enable rule:line-length | ||||
|     - mac_address: AC:37:43:77:5F:4C | ||||
|       then: | ||||
|         # yamllint disable rule:line-length | ||||
|         - lambda: !lambda |- | ||||
|             ESP_LOGD("main", "The device address is %s", x.address_str().c_str()); | ||||
|         # yamllint enable rule:line-length | ||||
|     - then: | ||||
|         # yamllint disable rule:line-length | ||||
|         - lambda: !lambda |- | ||||
|             ESP_LOGD("main", "The device address is %s", x.address_str().c_str()); | ||||
|         # yamllint enable rule:line-length | ||||
|   on_ble_service_data_advertise: | ||||
|     - service_uuid: ABCD | ||||
|       then: | ||||
|         - lambda: !lambda |- | ||||
|             ESP_LOGD("main", "Length of service data is %i", x.size()); | ||||
|   on_ble_manufacturer_data_advertise: | ||||
|     - manufacturer_id: ABCD | ||||
|       then: | ||||
|         - lambda: !lambda |- | ||||
|             ESP_LOGD("main", "Length of manufacturer data is %i", x.size()); | ||||
|   on_scan_end: | ||||
|     - then: | ||||
|         - lambda: |- | ||||
|              ESP_LOGD("ble_auto", "The scan has ended!"); | ||||
		Reference in New Issue
	
	Block a user