mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
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
a94a5ac9b5
commit
dba5c74c8f
@ -38,7 +38,8 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
|
|
||||||
for device_name, device_config in devices.items():
|
for device_name, device_config in devices.items():
|
||||||
value_template = device_config.get(CONF_VALUE_TEMPLATE)
|
value_template = device_config.get(CONF_VALUE_TEMPLATE)
|
||||||
value_template.hass = hass
|
if value_template is not None:
|
||||||
|
value_template.hass = hass
|
||||||
|
|
||||||
covers.append(
|
covers.append(
|
||||||
CommandCover(
|
CommandCover(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user