mirror of
https://github.com/esphome/esphome.git
synced 2024-12-02 11:44:13 +01:00
ad43d6a5bc
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
23 lines
660 B
Python
23 lines
660 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"]
|
|
CODEOWNERS = ["@jeffeb3"]
|
|
|
|
radon_eye_ble_ns = cg.esphome_ns.namespace("radon_eye_ble")
|
|
RadonEyeListener = radon_eye_ble_ns.class_(
|
|
"RadonEyeListener", esp32_ble_tracker.ESPBTDeviceListener
|
|
)
|
|
|
|
CONFIG_SCHEMA = cv.Schema(
|
|
{
|
|
cv.GenerateID(): cv.declare_id(RadonEyeListener),
|
|
}
|
|
).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)
|