1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-14 14:48:18 +00:00

Fix value range trigger 😑

This commit is contained in:
Otto Winter 2018-10-20 14:37:04 +02:00
parent 4aeb756388
commit 12993c430f
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E

View File

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