mirror of
https://github.com/esphome/esphome.git
synced 2024-12-24 14:34:54 +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):
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
await sensor.register_sensor(var, config)
|
||||
var = await sensor.new_sensor(config)
|
||||
await cg.register_component(var, config)
|
||||
await cg.register_parented(var, config[CONF_MCP3428_ID])
|
||||
|
||||
|
|
Loading…
Reference in a new issue