mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-18 06:46:58 +00:00
Update sensor.rest.markdown (#30154)
This commit is contained in:
parent
53504b71cf
commit
39f15f9724
@ -411,7 +411,7 @@ rest:
|
|||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
The example below shows how to extract multiple values from a dictionary from the XML file of a Steamist Steambath Wi-Fi interface. The values are used to create a switch and multiple sensors without having to poll the endpoint numerous times.
|
The example below shows how to extract multiple values from a dictionary from the XML file of a Steamist Steambath Wi-Fi interface. The values are used to create multiple sensors without having to poll the endpoint numerous times.
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
|
|
||||||
@ -431,32 +431,6 @@ rest:
|
|||||||
value_template: "{{ json_value['response']['time0'] }}"
|
value_template: "{{ json_value['response']['time0'] }}"
|
||||||
unit_of_measurement: "minutes"
|
unit_of_measurement: "minutes"
|
||||||
|
|
||||||
switch:
|
|
||||||
- name: "Steam"
|
|
||||||
value_template: "{{ json_value['response']['usr0'] | int >= 1 }}"
|
|
||||||
turn_on:
|
|
||||||
- service: rest_command.set_steam_led
|
|
||||||
data:
|
|
||||||
led: 6
|
|
||||||
- service: homeassistant.update_entity
|
|
||||||
target:
|
|
||||||
entity_id: sensor.steam_system_data
|
|
||||||
- delay: 00:00:15
|
|
||||||
- service: homeassistant.update_entity
|
|
||||||
target:
|
|
||||||
entity_id: sensor.steam_system_data
|
|
||||||
turn_off:
|
|
||||||
- service: rest_command.set_steam_led
|
|
||||||
data:
|
|
||||||
led: 7
|
|
||||||
- service: homeassistant.update_entity
|
|
||||||
target:
|
|
||||||
entity_id: sensor.steam_system_data
|
|
||||||
- delay: 00:00:15
|
|
||||||
- service: homeassistant.update_entity
|
|
||||||
target:
|
|
||||||
entity_id: sensor.steam_system_data
|
|
||||||
|
|
||||||
rest_command:
|
rest_command:
|
||||||
set_steam_led:
|
set_steam_led:
|
||||||
url: http://192.168.1.105/leds.cgi?led={{ led }}
|
url: http://192.168.1.105/leds.cgi?led={{ led }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user