mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	Add some components to the new testing framework (A part 1) (#6142)
This commit is contained in:
		
							
								
								
									
										31
									
								
								tests/components/addressable_light/test.esp32-c3-idf.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								tests/components/addressable_light/test.esp32-c3-idf.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| light: | ||||
|   - platform: esp32_rmt_led_strip | ||||
|     id: led_matrix_32x8 | ||||
|     default_transition_length: 500ms | ||||
|     chipset: ws2812 | ||||
|     rgb_order: GRB | ||||
|     num_leds: 256 | ||||
|     pin: 2 | ||||
|     rmt_channel: 0 | ||||
|  | ||||
| display: | ||||
|   - platform: addressable_light | ||||
|     id: led_matrix_32x8_display | ||||
|     addressable_light_id: led_matrix_32x8 | ||||
|     width: 32 | ||||
|     height: 8 | ||||
|     pixel_mapper: |- | ||||
|       if (x % 2 == 0) { | ||||
|         return (x * 8) + y; | ||||
|       } | ||||
|       return (x * 8) + (7 - y); | ||||
|     lambda: |- | ||||
|       Color red = Color(0xFF0000); | ||||
|       Color green = Color(0x00FF00); | ||||
|       Color blue = Color(0x0000FF); | ||||
|       it.rectangle(0, 0, it.get_width(), it.get_height(), red); | ||||
|       it.rectangle(1, 1, it.get_width()-2, it.get_height()-2, green); | ||||
|       it.rectangle(2, 2, it.get_width()-4, it.get_height()-4, blue); | ||||
|       it.rectangle(3, 3, it.get_width()-6, it.get_height()-6, red); | ||||
|     rotation: 0° | ||||
|     update_interval: 16ms | ||||
							
								
								
									
										31
									
								
								tests/components/addressable_light/test.esp32-c3.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								tests/components/addressable_light/test.esp32-c3.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| light: | ||||
|   - platform: esp32_rmt_led_strip | ||||
|     id: led_matrix_32x8 | ||||
|     default_transition_length: 500ms | ||||
|     chipset: ws2812 | ||||
|     rgb_order: GRB | ||||
|     num_leds: 256 | ||||
|     pin: 2 | ||||
|     rmt_channel: 0 | ||||
|  | ||||
| display: | ||||
|   - platform: addressable_light | ||||
|     id: led_matrix_32x8_display | ||||
|     addressable_light_id: led_matrix_32x8 | ||||
|     width: 32 | ||||
|     height: 8 | ||||
|     pixel_mapper: |- | ||||
|       if (x % 2 == 0) { | ||||
|         return (x * 8) + y; | ||||
|       } | ||||
|       return (x * 8) + (7 - y); | ||||
|     lambda: |- | ||||
|       Color red = Color(0xFF0000); | ||||
|       Color green = Color(0x00FF00); | ||||
|       Color blue = Color(0x0000FF); | ||||
|       it.rectangle(0, 0, it.get_width(), it.get_height(), red); | ||||
|       it.rectangle(1, 1, it.get_width()-2, it.get_height()-2, green); | ||||
|       it.rectangle(2, 2, it.get_width()-4, it.get_height()-4, blue); | ||||
|       it.rectangle(3, 3, it.get_width()-6, it.get_height()-6, red); | ||||
|     rotation: 0° | ||||
|     update_interval: 16ms | ||||
							
								
								
									
										31
									
								
								tests/components/addressable_light/test.esp32-idf.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								tests/components/addressable_light/test.esp32-idf.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| light: | ||||
|   - platform: esp32_rmt_led_strip | ||||
|     id: led_matrix_32x8 | ||||
|     default_transition_length: 500ms | ||||
|     chipset: ws2812 | ||||
|     rgb_order: GRB | ||||
|     num_leds: 256 | ||||
|     pin: 2 | ||||
|     rmt_channel: 0 | ||||
|  | ||||
| display: | ||||
|   - platform: addressable_light | ||||
|     id: led_matrix_32x8_display | ||||
|     addressable_light_id: led_matrix_32x8 | ||||
|     width: 32 | ||||
|     height: 8 | ||||
|     pixel_mapper: |- | ||||
|       if (x % 2 == 0) { | ||||
|         return (x * 8) + y; | ||||
|       } | ||||
|       return (x * 8) + (7 - y); | ||||
|     lambda: |- | ||||
|       Color red = Color(0xFF0000); | ||||
|       Color green = Color(0x00FF00); | ||||
|       Color blue = Color(0x0000FF); | ||||
|       it.rectangle(0, 0, it.get_width(), it.get_height(), red); | ||||
|       it.rectangle(1, 1, it.get_width()-2, it.get_height()-2, green); | ||||
|       it.rectangle(2, 2, it.get_width()-4, it.get_height()-4, blue); | ||||
|       it.rectangle(3, 3, it.get_width()-6, it.get_height()-6, red); | ||||
|     rotation: 0° | ||||
|     update_interval: 16ms | ||||
							
								
								
									
										32
									
								
								tests/components/addressable_light/test.esp32.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								tests/components/addressable_light/test.esp32.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,32 @@ | ||||
| light: | ||||
|   - platform: fastled_clockless | ||||
|     id: led_matrix_32x8 | ||||
|     name: led_matrix_32x8 | ||||
|     chipset: WS2812B | ||||
|     pin: 2 | ||||
|     num_leds: 256 | ||||
|     rgb_order: GRB | ||||
|     default_transition_length: 0s | ||||
|     color_correct: [50%, 50%, 50%] | ||||
|  | ||||
| display: | ||||
|   - platform: addressable_light | ||||
|     id: led_matrix_32x8_display | ||||
|     addressable_light_id: led_matrix_32x8 | ||||
|     width: 32 | ||||
|     height: 8 | ||||
|     pixel_mapper: |- | ||||
|       if (x % 2 == 0) { | ||||
|         return (x * 8) + y; | ||||
|       } | ||||
|       return (x * 8) + (7 - y); | ||||
|     lambda: |- | ||||
|       Color red = Color(0xFF0000); | ||||
|       Color green = Color(0x00FF00); | ||||
|       Color blue = Color(0x0000FF); | ||||
|       it.rectangle(0, 0, it.get_width(), it.get_height(), red); | ||||
|       it.rectangle(1, 1, it.get_width()-2, it.get_height()-2, green); | ||||
|       it.rectangle(2, 2, it.get_width()-4, it.get_height()-4, blue); | ||||
|       it.rectangle(3, 3, it.get_width()-6, it.get_height()-6, red); | ||||
|     rotation: 0° | ||||
|     update_interval: 16ms | ||||
		Reference in New Issue
	
	Block a user