1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-11 15:52:20 +01:00

Warn if not registered properly

This commit is contained in:
Otto Winter
2019-05-21 12:23:38 +02:00
parent a323679771
commit 999c1a5357
9 changed files with 30 additions and 6 deletions

View File

@@ -254,6 +254,7 @@ def setup_binary_sensor_core_(var, config):
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var, timings)
if CONF_INVALID_COOLDOWN in conf:
cg.add(trigger.set_invalid_cooldown(conf[CONF_INVALID_COOLDOWN]))
yield cg.register_component(trigger, conf)
yield automation.build_automation(trigger, [], conf)
for conf in config.get(CONF_ON_STATE, []):