mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-13 12:26:50 +00:00
Quote some strings in rest docs (#27593)
This commit is contained in:
parent
d953e1e504
commit
afd6b7abb3
@ -291,7 +291,7 @@ sensor:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
rest:
|
rest:
|
||||||
- resource: http://date.jsontest.com/
|
- resource: "http://date.jsontest.com/"
|
||||||
sensor:
|
sensor:
|
||||||
- name: "Time"
|
- name: "Time"
|
||||||
value_template: "{{ value_json.time }}"
|
value_template: "{{ value_json.time }}"
|
||||||
@ -331,7 +331,7 @@ This sample fetches a weather report from [OpenWeatherMap](https://openweatherma
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
rest:
|
rest:
|
||||||
- resource: https://api.openweathermap.org/data/2.5/weather?zip=80302,us&APPID=VERYSECRETAPIKEY
|
- resource: "https://api.openweathermap.org/data/2.5/weather?zip=80302,us&APPID=VERYSECRETAPIKEY"
|
||||||
sensor:
|
sensor:
|
||||||
- name: "Report"
|
- name: "Report"
|
||||||
value_template: "{{ value_json['weather'][0]['description'].title() }}"
|
value_template: "{{ value_json['weather'][0]['description'].title() }}"
|
||||||
@ -385,7 +385,7 @@ This configuration shows how to extract multiple values from a dictionary. This
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
rest:
|
rest:
|
||||||
resource: http://<address_to_rest_service>
|
resource: "http://<address_to_rest_service>"
|
||||||
sensor:
|
sensor:
|
||||||
- name: "Bedroom1 Temperature"
|
- name: "Bedroom1 Temperature"
|
||||||
value_template: "{{ value_json['bedroom1']['temperature'] }}"
|
value_template: "{{ value_json['bedroom1']['temperature'] }}"
|
||||||
@ -414,11 +414,11 @@ The example below shows how to extract multiple values from a dictionary from th
|
|||||||
```yaml
|
```yaml
|
||||||
rest:
|
rest:
|
||||||
# Steam Controller
|
# Steam Controller
|
||||||
- resource: http://192.168.1.105/status.xml
|
- resource: "http://192.168.1.105/status.xml"
|
||||||
scan_interval: 15
|
scan_interval: 15
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- name: Steam Temp
|
- name: "Steam Temp"
|
||||||
value_template: "{{ json_value['response']['temp0'] | regex_findall_index('([0-9]+)XF') }}"
|
value_template: "{{ json_value['response']['temp0'] | regex_findall_index('([0-9]+)XF') }}"
|
||||||
unit_of_measurement: "°F"
|
unit_of_measurement: "°F"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user