1
0
mirror of https://github.com/esphome/esphome.git synced 2025-07-13 18:43:12 +01:00

Smallish Update

This commit is contained in:
Otto Winter
2018-08-13 19:11:33 +02:00
parent 5680de79a9
commit 5170a7cdf4
63 changed files with 1797 additions and 1215 deletions

@ -2,10 +2,12 @@ import voluptuous as vol
from esphomeyaml import config_validation as cv
from esphomeyaml.const import CONF_ID, CONF_SCAN_INTERVAL, ESP_PLATFORM_ESP32
from esphomeyaml.helpers import App, Pvariable, add, esphomelib_ns
from esphomeyaml.core import HexInt
from esphomeyaml.helpers import App, Pvariable, add, esphomelib_ns, ArrayInitializer
ESP_PLATFORMS = [ESP_PLATFORM_ESP32]
CONF_ESP32_BLE_ID = 'esp32_ble_id'
ESP32BLETracker = esphomelib_ns.ESP32BLETracker
CONFIG_SCHEMA = vol.Schema({
@ -14,6 +16,11 @@ CONFIG_SCHEMA = vol.Schema({
})
def make_address_array(address):
addr = [HexInt(i) for i in address.parts]
return ArrayInitializer(*addr, multiline=False)
def to_code(config):
rhs = App.make_esp32_ble_tracker()
ble = Pvariable(config[CONF_ID], rhs)