From cf7c06d3077cfc6305107bb548abf794933c4649 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 27 Jan 2016 09:21:21 +0100 Subject: [PATCH] Update docstring and fix typos --- homeassistant/components/sensor/template.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/sensor/template.py b/homeassistant/components/sensor/template.py index a75d0a3e656..4af3cae9260 100644 --- a/homeassistant/components/sensor/template.py +++ b/homeassistant/components/sensor/template.py @@ -1,6 +1,6 @@ """ homeassistant.components.sensor.template -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Allows the creation of a sensor that breaks out state_attributes from other entities. @@ -20,9 +20,7 @@ from homeassistant.util import template from homeassistant.exceptions import TemplateError _LOGGER = logging.getLogger(__name__) - CONF_SENSORS = 'sensors' - STATE_ERROR = 'error' @@ -32,7 +30,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): sensors = [] if config.get(CONF_SENSORS) is None: - _LOGGER.error("Missing configuration data for sensor platfoprm") + _LOGGER.error("Missing configuration data for sensor platform") return False for device, device_config in config[CONF_SENSORS].items(): @@ -54,7 +52,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): state_template) ) if sensors is None: - _LOGGER.error("No sensors added.") + _LOGGER.error("No sensors added") return False add_devices(sensors) return True