Update config.py

This commit is contained in:
Johannes
2022-04-03 22:06:30 +02:00
committed by GitHub
parent b85cdff932
commit eed5a40fd9

View File

@@ -8,6 +8,9 @@ class Entity(object):
def __init__(self, entity_input_config): def __init__(self, entity_input_config):
if type(entity_input_config) is not dict: if type(entity_input_config) is not dict:
LOGGER.error("Config error, not a dict check your entity configs") LOGGER.error("Config error, not a dict check your entity configs")
self.entityId = "error"
self.nameOverride = None
self.iconOverride = None
else: else:
self.entityId = entity_input_config.get("entity", "unknown") self.entityId = entity_input_config.get("entity", "unknown")
self.nameOverride = entity_input_config.get("name") self.nameOverride = entity_input_config.get("name")