From b20d3f8b3af41a233262175fbdc593be0fb61d9c Mon Sep 17 00:00:00 2001 From: pavoni Date: Wed, 3 Feb 2016 23:23:19 +0000 Subject: [PATCH] Update docstrings. --- homeassistant/components/switch/template.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/switch/template.py b/homeassistant/components/switch/template.py index 9e231de0299..34524978c84 100644 --- a/homeassistant/components/switch/template.py +++ b/homeassistant/components/switch/template.py @@ -135,9 +135,11 @@ class SwitchTemplate(SwitchDevice): return False def turn_on(self, **kwargs): + """ Fires the on action. """ call_from_config(self.hass, self._on_action, True) def turn_off(self, **kwargs): + """ Fires the off action. """ call_from_config(self.hass, self._off_action, True) @property @@ -147,7 +149,7 @@ class SwitchTemplate(SwitchDevice): @property def is_off(self): - """ True if device is on. """ + """ True if device is off. """ return self._state == STATE_FALSE or self._state == STATE_OFF @property @@ -160,6 +162,7 @@ class SwitchTemplate(SwitchDevice): return self._state def update(self): + """ Updates the state from the template. """ try: self._state = template.render(self.hass, self._template) except TemplateError as ex: