Files
esphome-dev/esphome/components/ruuvi_ble/__init__.py
T
Alexander Leisentritt 3e8fd48dc0 implemented ruuvi_ble and ruuvitag with RAWv1 and RAWv2 protocol (#810)
* implemented ruuvi_ble and ruuvitag with RAWv1 protocol

fixes esphome/feature-requests#313

* lint

* updated data calculations

* cpp lint

* use string directly in message

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* add RAWv2 protocol support

* fix ICON_SIGNAL

* typo

* calculation correction and cleaning

* c++ lint

* added acceleration and fixed typo

* removed remote_receiver to reduce firmware size

remote_receiver also in test1.yaml
2019-11-07 22:10:09 +01:00

19 lines
593 B
Python

import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.components import esp32_ble_tracker
from esphome.const import CONF_ID
DEPENDENCIES = ['esp32_ble_tracker']
ruuvi_ble_ns = cg.esphome_ns.namespace('ruuvi_ble')
RuuviListener = ruuvi_ble_ns.class_('RuuviListener', esp32_ble_tracker.ESPBTDeviceListener)
CONFIG_SCHEMA = cv.Schema({
cv.GenerateID(): cv.declare_id(RuuviListener),
}).extend(esp32_ble_tracker.ESP_BLE_DEVICE_SCHEMA)
def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])
yield esp32_ble_tracker.register_ble_device(var, config)