Device description in dashboard (#707)

* Description

* Review fixes

* Test

* Label

* Description renamed to comment
This commit is contained in:
Nikolay Vasilchuk
2019-10-14 12:27:07 +03:00
committed by Otto Winter
parent 0eadda77b0
commit be91cfb261
8 changed files with 40 additions and 5 deletions
+9 -2
View File
@@ -10,8 +10,8 @@ import re
# pylint: disable=unused-import, wrong-import-order
from typing import Any, Dict, List # noqa
from esphome.const import CONF_ARDUINO_VERSION, CONF_ESPHOME, CONF_USE_ADDRESS, CONF_WIFI, \
SOURCE_FILE_EXTENSIONS
from esphome.const import CONF_ARDUINO_VERSION, SOURCE_FILE_EXTENSIONS, \
CONF_COMMENT, CONF_ESPHOME, CONF_USE_ADDRESS, CONF_WIFI
from esphome.helpers import ensure_unique_string, is_hassio
from esphome.py_compat import IS_PY2, integer_types, text_type, string_types
from esphome.util import OrderedDict
@@ -539,6 +539,13 @@ class EsphomeCore(object):
return None
@property
def comment(self): # type: () -> str
if CONF_COMMENT in self.config[CONF_ESPHOME]:
return self.config[CONF_ESPHOME][CONF_COMMENT]
return None
def _add_active_coroutine(self, instance_id, obj):
self.active_coroutines[instance_id] = obj