From 749fc583ea5f1305f502e4cf7d94e5d93977d1be Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Fri, 11 Nov 2016 06:32:08 +0100 Subject: [PATCH] Fix rest switch default template (#4331) --- homeassistant/components/switch/rest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/switch/rest.py b/homeassistant/components/switch/rest.py index 056bcef0281..36674c16d16 100644 --- a/homeassistant/components/switch/rest.py +++ b/homeassistant/components/switch/rest.py @@ -12,11 +12,12 @@ import voluptuous as vol from homeassistant.components.switch import (SwitchDevice, PLATFORM_SCHEMA) from homeassistant.const import (CONF_NAME, CONF_RESOURCE, CONF_TIMEOUT) import homeassistant.helpers.config_validation as cv +from homeassistant.helpers.template import Template CONF_BODY_OFF = 'body_off' CONF_BODY_ON = 'body_on' -DEFAULT_BODY_OFF = 'OFF' -DEFAULT_BODY_ON = 'ON' +DEFAULT_BODY_OFF = Template('OFF') +DEFAULT_BODY_ON = Template('ON') DEFAULT_NAME = 'REST Switch' DEFAULT_TIMEOUT = 10 CONF_IS_ON_TEMPLATE = 'is_on_template'