mirror of
				https://github.com/esphome/esphome.git
				synced 2025-11-04 00:51:49 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			47 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
substitutions:
 | 
						|
  verify_ssl: "true"
 | 
						|
 | 
						|
network:
 | 
						|
 | 
						|
esphome:
 | 
						|
  on_boot:
 | 
						|
    then:
 | 
						|
      - http_request.get:
 | 
						|
          url: https://esphome.io
 | 
						|
          request_headers:
 | 
						|
            Content-Type: application/json
 | 
						|
          on_error:
 | 
						|
            logger.log: "Request failed"
 | 
						|
          on_response:
 | 
						|
            then:
 | 
						|
              - logger.log:
 | 
						|
                  format: "Response status: %d, Duration: %lu ms"
 | 
						|
                  args:
 | 
						|
                    - response->status_code
 | 
						|
                    - (long) response->duration_ms
 | 
						|
      - http_request.post:
 | 
						|
          url: https://esphome.io
 | 
						|
          request_headers:
 | 
						|
            Content-Type: application/json
 | 
						|
          json:
 | 
						|
            key: value
 | 
						|
      - http_request.send:
 | 
						|
          method: PUT
 | 
						|
          url: https://esphome.io
 | 
						|
          request_headers:
 | 
						|
            Content-Type: application/json
 | 
						|
          body: "Some data"
 | 
						|
 | 
						|
http_request:
 | 
						|
  useragent: esphome/tagreader
 | 
						|
  timeout: 10s
 | 
						|
  verify_ssl: ${verify_ssl}
 | 
						|
 | 
						|
script:
 | 
						|
  - id: does_not_compile
 | 
						|
    parameters:
 | 
						|
      api_url: string
 | 
						|
    then:
 | 
						|
      - http_request.get:
 | 
						|
          url: "http://google.com"
 |