mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Add docs for verify_ssl configuration added to rest_command and switch.rest (#8205)
This commit is contained in:
parent
43e8536d66
commit
a8cd28c5cf
@ -30,7 +30,7 @@ rest_command:
|
|||||||
{% configuration %}
|
{% configuration %}
|
||||||
service_name:
|
service_name:
|
||||||
description: The name used to expose the service. E.g., in the above example, it would be 'rest_command.service_name'.
|
description: The name used to expose the service. E.g., in the above example, it would be 'rest_command.service_name'.
|
||||||
required: true
|
required: true
|
||||||
type: map
|
type: map
|
||||||
keys:
|
keys:
|
||||||
url:
|
url:
|
||||||
@ -59,7 +59,7 @@ service_name:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
timeout:
|
timeout:
|
||||||
description: Timeout for requests in seconds.
|
description: Timeout for requests in seconds.
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
defaut: 10
|
defaut: 10
|
||||||
@ -67,6 +67,11 @@ service_name:
|
|||||||
description: Content type for the request.
|
description: Content type for the request.
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
verify_ssl:
|
||||||
|
description: Verify the SSL certificate of the endpoint.
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
## {% linkable_title Examples %}
|
## {% linkable_title Examples %}
|
||||||
@ -80,11 +85,12 @@ rest_command:
|
|||||||
my_request:
|
my_request:
|
||||||
url: https://slack.com/api/users.profile.set
|
url: https://slack.com/api/users.profile.set
|
||||||
method: POST
|
method: POST
|
||||||
headers:
|
headers:
|
||||||
authorization: !secret rest_headers_secret
|
authorization: !secret rest_headers_secret
|
||||||
accept: 'application/json, text/html'
|
accept: 'application/json, text/html'
|
||||||
payload: '{"profile":{"status_text": "{{ status }}","status_emoji": "{{ emoji }}"}}'
|
payload: '{"profile":{"status_text": "{{ status }}","status_emoji": "{{ emoji }}"}}'
|
||||||
content_type: 'application/json; charset=utf-8'
|
content_type: 'application/json; charset=utf-8'
|
||||||
|
verify_ssl: true
|
||||||
```
|
```
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ payload:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
verify_ssl:
|
verify_ssl:
|
||||||
description: Verify the certification of the endpoint.
|
description: Verify the SSL certificate of the endpoint.
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: True
|
default: True
|
||||||
@ -173,7 +173,7 @@ sensor:
|
|||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
```
|
```
|
||||||
|
|
||||||
The headers will contain all relevant details. This will also give you the ability to access endpoints that are protected by tokens.
|
The headers will contain all relevant details. This will also give you the ability to access endpoints that are protected by tokens.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
Content-Length: 1024
|
Content-Length: 1024
|
||||||
@ -234,7 +234,7 @@ This sample fetches a weather report from [OpenWeatherMap](http://openweathermap
|
|||||||
sensor:
|
sensor:
|
||||||
- platform: rest
|
- platform: rest
|
||||||
name: OWM_report
|
name: OWM_report
|
||||||
json_attributes:
|
json_attributes:
|
||||||
- main
|
- main
|
||||||
- weather
|
- weather
|
||||||
value_template: '{{ value_json["weather"][0]["description"].title() }}'
|
value_template: '{{ value_json["weather"][0]["description"].title() }}'
|
||||||
|
@ -72,6 +72,11 @@ headers:
|
|||||||
description: The headers for the request.
|
description: The headers for the request.
|
||||||
required: false
|
required: false
|
||||||
type: list, string
|
type: list, string
|
||||||
|
verify_ssl:
|
||||||
|
description: Verify the SSL certificate of the endpoint.
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
<p class='note warning'>
|
<p class='note warning'>
|
||||||
@ -98,6 +103,7 @@ switch:
|
|||||||
is_on_template: '{{ value_json.is_active }}'
|
is_on_template: '{{ value_json.is_active }}'
|
||||||
headers:
|
headers:
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
verify_ssl: true
|
||||||
```
|
```
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user