mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	add http request tests (#1448)
* add http request tests * add to test3 for esp8266 * move test action to another trigger
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							f084ab339b
						
					
				
				
					commit
					52c67d715b
				
			| @@ -26,6 +26,25 @@ esphome: | ||||
|           green: !lambda 'return 255;' | ||||
|           blue: 0% | ||||
|           white: 100% | ||||
|       - http_request.get: | ||||
|           url: https://esphome.io | ||||
|           headers: | ||||
|             Content-Type: application/json | ||||
|           verify_ssl: false | ||||
|       - http_request.post: | ||||
|           url: https://esphome.io | ||||
|           verify_ssl: false | ||||
|           json: | ||||
|             key: !lambda |- | ||||
|               return id(template_text).state; | ||||
|             greeting: 'Hello World' | ||||
|       - http_request.send: | ||||
|           method: PUT | ||||
|           url: https://esphome.io | ||||
|           headers: | ||||
|             Content-Type: application/json | ||||
|           body: 'Some data' | ||||
|           verify_ssl: false | ||||
|   build_path: build/test1 | ||||
|  | ||||
| packages: | ||||
| @@ -50,6 +69,10 @@ wifi: | ||||
|   reboot_timeout: 120s | ||||
|   power_save_mode: none | ||||
|  | ||||
| http_request: | ||||
|   useragent: esphome/device | ||||
|   timeout: 10s | ||||
|  | ||||
| mqtt: | ||||
|   broker: '192.168.178.84' | ||||
|   port: 1883 | ||||
| @@ -211,7 +234,6 @@ mcp23s17: | ||||
|     cs_pin: GPIO12 | ||||
|     deviceaddress: 1 | ||||
|  | ||||
|  | ||||
| sensor: | ||||
|   - platform: adc | ||||
|     pin: A0 | ||||
| @@ -1727,7 +1749,7 @@ display: | ||||
|     lambda: |- | ||||
|       it.rectangle(0, 0, it.get_width(), it.get_height()); | ||||
|   - platform: ssd1322_spi | ||||
|     model: "SSD1322 256x64" | ||||
|     model: 'SSD1322 256x64' | ||||
|     cs_pin: GPIO23 | ||||
|     dc_pin: GPIO23 | ||||
|     reset_pin: GPIO23 | ||||
| @@ -1863,8 +1885,7 @@ time: | ||||
|     update_interval: never | ||||
|     on_time: | ||||
|       seconds: 0 | ||||
|       then: | ||||
|         ds1307.read_time | ||||
|       then: ds1307.read_time | ||||
|  | ||||
| cover: | ||||
|   - platform: template | ||||
|   | ||||
| @@ -886,6 +886,25 @@ rf_bridge: | ||||
|         code: 'ABC123' | ||||
|     - rf_bridge.send_raw: | ||||
|         raw: 'AAA5070008001000ABC12355' | ||||
|     - http_request.get: | ||||
|         url: https://esphome.io | ||||
|         headers: | ||||
|           Content-Type: application/json | ||||
|         verify_ssl: false | ||||
|     - http_request.post: | ||||
|         url: https://esphome.io | ||||
|         verify_ssl: false | ||||
|         json: | ||||
|           key: !lambda |- | ||||
|             return id(version_sensor).state; | ||||
|           greeting: 'Hello World' | ||||
|     - http_request.send: | ||||
|         method: PUT | ||||
|         url: https://esphome.io | ||||
|         headers: | ||||
|           Content-Type: application/json | ||||
|         body: 'Some data' | ||||
|         verify_ssl: false | ||||
|  | ||||
| display: | ||||
|   - platform: max7219digit | ||||
| @@ -897,3 +916,7 @@ display: | ||||
|     id: my_matrix | ||||
|     lambda: |- | ||||
|       it.printdigit("hello"); | ||||
|  | ||||
| http_request: | ||||
|   useragent: esphome/device | ||||
|   timeout: 10s | ||||
|   | ||||
		Reference in New Issue
	
	Block a user