mirror of
https://github.com/esphome/esphome.git
synced 2024-11-30 18:54:14 +01:00
streamline sensor/__init__.py
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
parent
813711e233
commit
cd960815fa
1 changed files with 1 additions and 2 deletions
|
@ -65,8 +65,7 @@ CONFIG_SCHEMA = (
|
||||||
|
|
||||||
|
|
||||||
async def to_code(config):
|
async def to_code(config):
|
||||||
var = cg.new_Pvariable(config[CONF_ID])
|
var = await sensor.new_sensor(config)
|
||||||
await sensor.register_sensor(var, config)
|
|
||||||
await cg.register_component(var, config)
|
await cg.register_component(var, config)
|
||||||
await cg.register_parented(var, config[CONF_MCP3428_ID])
|
await cg.register_parented(var, config[CONF_MCP3428_ID])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue