1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-11 06:13:47 +01:00

Minor tidy up of BME280 code (#6672)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Anton Viktorov
2024-05-06 04:19:25 +02:00
committed by GitHub
parent 833d31ef7a
commit 599dbf27e0
21 changed files with 231 additions and 371 deletions

View File

@@ -1,9 +1,10 @@
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.components import i2c
from ..bme280_base.sensor import to_code as to_code_base, cv, CONFIG_SCHEMA_BASE
from ..bme280_base import to_code_base, CONFIG_SCHEMA_BASE
DEPENDENCIES = ["i2c"]
AUTO_LOAD = ["bme280_base"]
DEPENDENCIES = ["i2c"]
bme280_ns = cg.esphome_ns.namespace("bme280_i2c")
BME280I2CComponent = bme280_ns.class_(
@@ -16,4 +17,5 @@ CONFIG_SCHEMA = CONFIG_SCHEMA_BASE.extend(
async def to_code(config):
await to_code_base(config, func=i2c.register_i2c_device)
var = await to_code_base(config)
await i2c.register_i2c_device(var, config)