mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-29 22:24:26 +00:00 
			
		
		
		
	Co-authored-by: Jimmy Hedman <jimmy.hedman@gmail.com> Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: Rodrigo Martín <contact@rodrigomartin.dev> Co-authored-by: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com>
		
			
				
	
	
		
			57 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			57 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| wifi:
 | |
|   ssid: MySSID
 | |
|   password: password1
 | |
| 
 | |
| # Purposely test that `online_image:` does auto-load `image:`
 | |
| # Keep the `image:` undefined.
 | |
| # image:
 | |
| online_image:
 | |
|   - id: online_binary_image
 | |
|     url: http://www.libpng.org/pub/png/img_png/pnglogo-blk-tiny.png
 | |
|     format: PNG
 | |
|     type: BINARY
 | |
|     resize: 50x50
 | |
|   - id: online_binary_transparent_image
 | |
|     url: http://www.libpng.org/pub/png/img_png/pnglogo-blk-tiny.png
 | |
|     type: BINARY
 | |
|     transparency: chroma_key
 | |
|     format: png
 | |
|   - id: online_rgba_image
 | |
|     url: http://www.libpng.org/pub/png/img_png/pnglogo-blk-tiny.png
 | |
|     format: PNG
 | |
|     type: RGB
 | |
|     transparency: alpha_channel
 | |
|   - id: online_rgb24_image
 | |
|     url: http://www.libpng.org/pub/png/img_png/pnglogo-blk-tiny.png
 | |
|     format: PNG
 | |
|     type: RGB
 | |
|     transparency: chroma_key
 | |
|   - id: online_binary_bmp
 | |
|     url: https://samples-files.com/samples/images/bmp/480-360-sample.bmp
 | |
|     format: BMP
 | |
|     type: BINARY
 | |
|   - id: online_jpeg_image
 | |
|     url: http://www.faqs.org/images/library.jpg
 | |
|     format: JPEG
 | |
|     type: RGB
 | |
|   - id: online_jpg_image
 | |
|     url: http://www.faqs.org/images/library.jpg
 | |
|     format: JPG
 | |
|     type: RGB565
 | |
| 
 | |
| # Check the set_url action
 | |
| esphome:
 | |
|   on_boot:
 | |
|     then:
 | |
|       - online_image.set_url:
 | |
|           id: online_rgba_image
 | |
|           url: http://www.example.org/example.png
 | |
|       - online_image.set_url:
 | |
|           id: online_rgba_image
 | |
|           url: !lambda |-
 | |
|             return "http://www.example.org/example.png";
 | |
|       - online_image.set_url:
 | |
|           id: online_rgba_image
 | |
|           url: !lambda |-
 | |
|             return str_sprintf("http://homeassistant.local:8123");
 |