streamline sensor/__init__.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Michael Doppler 2024-07-07 13:29:13 +02:00 committed by GitHub
parent 813711e233
commit cd960815fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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])