1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-18 07:45:56 +00:00

Update Airthings BLE (#2453)

This commit is contained in:
Jesse Hills
2021-10-12 11:56:47 +13:00
committed by GitHub
parent 04ec1c8b56
commit 6a5eb43454
8 changed files with 89 additions and 56 deletions

View File

@@ -1,7 +1,6 @@
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.components import sensor, ble_client
from esphome.core import CORE
from esphome.const import (
DEVICE_CLASS_CARBON_DIOXIDE,
@@ -83,10 +82,8 @@ CONFIG_SCHEMA = cv.All(
),
}
)
.extend(cv.polling_component_schema("5mins"))
.extend(cv.polling_component_schema("5min"))
.extend(ble_client.BLE_CLIENT_SCHEMA),
# Until BLEUUID reference removed
cv.only_with_arduino,
)
@@ -117,6 +114,3 @@ async def to_code(config):
if CONF_TVOC in config:
sens = await sensor.new_sensor(config[CONF_TVOC])
cg.add(var.set_tvoc(sens))
if CORE.is_esp32:
cg.add_library("ESP32 BLE Arduino", None)