Disable MQTT if not used (#373)

* Disable MQTT if not used

* Lint
This commit is contained in:
Otto Winter
2019-01-29 17:29:21 +01:00
committed by GitHub
parent 7b26ecc0dc
commit 176c712eeb
66 changed files with 389 additions and 530 deletions
+5
View File
@@ -425,9 +425,14 @@ class EsphomeyamlCore(object):
yield None, None
def register_variable(self, id, obj):
if id in self.variables:
raise EsphomeyamlError("ID {} is already registered".format(id))
_LOGGER.debug("Registered variable %s of type %s", id.id, id.type)
self.variables[id] = obj
def has_id(self, id):
return id in self.variables
CORE = EsphomeyamlCore()