mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-05 12:30:28 +02:00
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
This commit is contained in:
committed by
Otto Winter
parent
003326f2eb
commit
3e8fd48dc0
@@ -0,0 +1,18 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user