From 6419d273eafa9ec9b1ef009936459a6e20939e99 Mon Sep 17 00:00:00 2001 From: Roi Dayan Date: Sat, 8 Oct 2016 23:03:32 +0300 Subject: [PATCH] Fix command line cover template (#3754) The command line cover value template is optional so we need to check it's not none before assigning hass to it. Fixes #3649 Signed-off-by: Roi Dayan --- homeassistant/components/cover/command_line.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/cover/command_line.py b/homeassistant/components/cover/command_line.py index d70d43463cf..27e1c810cf4 100644 --- a/homeassistant/components/cover/command_line.py +++ b/homeassistant/components/cover/command_line.py @@ -38,7 +38,8 @@ def setup_platform(hass, config, add_devices, discovery_info=None): for device_name, device_config in devices.items(): value_template = device_config.get(CONF_VALUE_TEMPLATE) - value_template.hass = hass + if value_template is not None: + value_template.hass = hass covers.append( CommandCover(