Update sensor.rest.markdown (#30154)

This commit is contained in:
tomlut 2023-12-05 19:31:49 +11:00 committed by GitHub
parent 53504b71cf
commit 39f15f9724
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -411,7 +411,7 @@ rest:
{% 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 %}
@ -431,32 +431,6 @@ rest:
value_template: "{{ json_value['response']['time0'] }}"
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:
set_steam_led:
url: http://192.168.1.105/leds.cgi?led={{ led }}