From 0d7bb1286aa0bc19b5dcd7bbf22126ab2b9ed114 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Sun, 17 Mar 2019 16:04:49 +0100 Subject: [PATCH] More changes for 1.12 (#483) * Print error when ESP32 BLE tracker used together with beacon * Update * Enable PSRAM * Fix test --- esphome/components/esp32_ble_beacon.py | 1 + esphome/components/esp32_camera.py | 6 +++--- esphome/voluptuous_schema.py | 4 ++++ tests/test2.yaml | 6 +++--- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/esphome/components/esp32_ble_beacon.py b/esphome/components/esp32_ble_beacon.py index adb348e548..3e0a48f2de 100644 --- a/esphome/components/esp32_ble_beacon.py +++ b/esphome/components/esp32_ble_beacon.py @@ -7,6 +7,7 @@ from esphome.cpp_helpers import setup_component from esphome.cpp_types import App, Component, esphome_ns ESP_PLATFORMS = [ESP_PLATFORM_ESP32] +CONFLICTS_WITH = ['esp32_ble_tracker'] ESP32BLEBeacon = esphome_ns.class_('ESP32BLEBeacon', Component) diff --git a/esphome/components/esp32_camera.py b/esphome/components/esp32_camera.py index a41e686efb..c0acdff630 100644 --- a/esphome/components/esp32_camera.py +++ b/esphome/components/esp32_camera.py @@ -64,11 +64,11 @@ CONFIG_SCHEMA = cv.Schema({ vol.Required(CONF_VSYNC_PIN): pins.input_pin, vol.Required(CONF_HREF_PIN): pins.input_pin, vol.Required(CONF_PIXEL_CLOCK_PIN): pins.input_pin, - vol.Required(CONF_EXTERNAL_CLOCK): vol.Schema({ + vol.Required(CONF_EXTERNAL_CLOCK): cv.Schema({ vol.Required(CONF_PIN): pins.output_pin, vol.Optional(CONF_FREQUENCY, default='20MHz'): vol.All(cv.frequency, vol.In([20e6, 10e6])), }), - vol.Required(CONF_I2C_PINS): vol.Schema({ + vol.Required(CONF_I2C_PINS): cv.Schema({ vol.Required(CONF_SDA): pins.output_pin, vol.Required(CONF_SCL): pins.output_pin, }), @@ -127,4 +127,4 @@ def to_code(config): add(cam.set_frame_size(FRAME_SIZES[config[CONF_RESOLUTION]])) -BUILD_FLAGS = '-DUSE_ESP32_CAMERA' +BUILD_FLAGS = ['-DUSE_ESP32_CAMERA', '-DBOARD_HAS_PSRAM'] diff --git a/esphome/voluptuous_schema.py b/esphome/voluptuous_schema.py index 6f293adf29..924952ded2 100644 --- a/esphome/voluptuous_schema.py +++ b/esphome/voluptuous_schema.py @@ -159,3 +159,7 @@ class _Schema(vol.Schema): return out return validate_mapping + + def extend(self, schema, required=None, extra=None): + ret = vol.Schema.extend(self, schema, required=required, extra=extra) + return _Schema(ret.schema, required=ret.required, extra=ret.extra) diff --git a/tests/test2.yaml b/tests/test2.yaml index 16195d3d85..03bb24578e 100644 --- a/tests/test2.yaml +++ b/tests/test2.yaml @@ -172,9 +172,9 @@ remote_receiver: esp32_ble_tracker: scan_interval: 300s -esp32_ble_beacon: - type: iBeacon - uuid: 'c29ce823-e67a-4e71-bff2-abaa32e77a98' +#esp32_ble_beacon: +# type: iBeacon +# uuid: 'c29ce823-e67a-4e71-bff2-abaa32e77a98' status_led: pin: GPIO2