diff --git a/esphomeyaml/components/my9231.py b/esphomeyaml/components/my9231.py index 7f0b7b87cd..a52e1b1033 100644 --- a/esphomeyaml/components/my9231.py +++ b/esphomeyaml/components/my9231.py @@ -7,9 +7,9 @@ from esphomeyaml.const import (CONF_DATA_PIN, CONF_CLOCK_PIN, CONF_NUM_CHANNELS, CONF_NUM_CHIPS, CONF_BIT_DEPTH, CONF_ID, CONF_UPDATE_ON_BOOT) from esphomeyaml.helpers import (gpio_output_pin_expression, App, Pvariable, - add, setup_component) + add, setup_component, Component) -MY9231OutputComponent = output.output_ns.namespace('MY9231OutputComponent') +MY9231OutputComponent = output.output_ns.class_('MY9231OutputComponent', Component) MY9231_SCHEMA = vol.Schema({ diff --git a/esphomeyaml/components/output/my9231.py b/esphomeyaml/components/output/my9231.py index 31d5381075..4669ed2400 100644 --- a/esphomeyaml/components/output/my9231.py +++ b/esphomeyaml/components/output/my9231.py @@ -8,7 +8,7 @@ from esphomeyaml.helpers import Pvariable, get_variable, setup_component DEPENDENCIES = ['my9231'] -Channel = MY9231OutputComponent.Channel +Channel = MY9231OutputComponent.class_('Channel', output.FloatOutput) PLATFORM_SCHEMA = output.FLOAT_OUTPUT_PLATFORM_SCHEMA.extend({ vol.Required(CONF_ID): cv.declare_variable_id(Channel), diff --git a/esphomeyaml/core_config.py b/esphomeyaml/core_config.py index 57f15f751b..16405c5fc1 100644 --- a/esphomeyaml/core_config.py +++ b/esphomeyaml/core_config.py @@ -16,6 +16,7 @@ from esphomeyaml.const import ARDUINO_VERSION_ESP32_DEV, ARDUINO_VERSION_ESP8266 from esphomeyaml.core import ESPHomeYAMLError from esphomeyaml.helpers import App, NoArg, Pvariable, RawExpression, add, const_char_p, \ esphomelib_ns, relative_path +from esphomeyaml.util import safe_print _LOGGER = logging.getLogger(__name__) @@ -232,10 +233,16 @@ def update_esphomelib_repo(config): # local changes, cannot update _LOGGER.warn("Local changes in esphomelib copy from git. Will not auto-update.") return - rc, _, _ = run_command('git', '-C', esphomelib_path, 'pull') + _LOGGER.info("Updating esphomelib copy from git (%s)", esphomelib_path) + rc, stdout, _ = run_command('git', '-c', 'color.ui=always', '-C', esphomelib_path, + 'pull', '--stat') if rc != 0: _LOGGER.warn("Couldn't auto-update local git copy of esphomelib.") return + stdout = stdout.strip() + if 'Already up to date' in stdout: + return + safe_print(stdout) def to_code(config):