From afdaee8f576593a339a89b879700713057c26cbf Mon Sep 17 00:00:00 2001 From: Nolan Gilley Date: Sun, 18 Dec 2016 03:55:43 -0500 Subject: [PATCH] show a template switch example for harmony (#1548) * show a template switch example * Update remote.harmony.markdown --- source/_components/remote.harmony.markdown | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/_components/remote.harmony.markdown b/source/_components/remote.harmony.markdown index 9f07c44f070..e392dab25fc 100755 --- a/source/_components/remote.harmony.markdown +++ b/source/_components/remote.harmony.markdown @@ -60,6 +60,22 @@ Supported services: ### {% linkable_title Examples %} +A template switch can be used to display and control the state of an activity in the frontend. + +```yaml +switch: + - platform: template + switches: + tv: + value_template: "{% raw %}{% if is_state('remote.family_room', 'on') %}on{% else %}off{% endif %}{% endraw %}" + turn_on: + service: remote.turn_on + entity_id: remote.family_room + turn_off: + service: remote.turn_off + entity_id: remote.family_room +``` + Template sensors can be utilized to display current activity in the frontend. ```yaml