mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +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
7882b19dc5
commit
6419d273ea
@ -38,6 +38,7 @@ 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)
|
||||||
|
if value_template is not None:
|
||||||
value_template.hass = hass
|
value_template.hass = hass
|
||||||
|
|
||||||
covers.append(
|
covers.append(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user