Fix value range trigger 😑 (#201)

This commit is contained in:
Otto Winter 2018-10-20 14:40:46 +02:00 committed by GitHub
parent 4aeb756388
commit d04de7baeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,12 +169,12 @@ def setup_sensor_core_(sensor_var, mqtt_var, config):
template_ = None template_ = None
for template_ in templatable(conf[CONF_ABOVE], float_, float_): for template_ in templatable(conf[CONF_ABOVE], float_, float_):
yield yield
trigger.set_min(template_) add(trigger.set_min(template_))
if CONF_BELOW in conf: if CONF_BELOW in conf:
template_ = None template_ = None
for template_ in templatable(conf[CONF_BELOW], float_, float_): for template_ in templatable(conf[CONF_BELOW], float_, float_):
yield yield
trigger.set_max(template_) add(trigger.set_max(template_))
automation.build_automation(trigger, float_, conf) automation.build_automation(trigger, float_, conf)
if CONF_EXPIRE_AFTER in config: if CONF_EXPIRE_AFTER in config: