mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-01 18:48:28 +02:00
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user