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 <roi.dayan@gmail.com>
This commit is contained in:
parent
7882b19dc5
commit
6419d273ea
1 changed files with 2 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Reference in a new issue