1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-12 00:02:21 +01:00

Pass optional args to 'new_Pvariable' when creating new entities (#3690)

This commit is contained in:
RoboMagus
2022-08-07 21:31:50 +02:00
committed by GitHub
parent cd473e1395
commit 989b7be99b
4 changed files with 8 additions and 8 deletions

View File

@@ -483,8 +483,8 @@ async def register_binary_sensor(var, config):
await setup_binary_sensor_core_(var, config)
async def new_binary_sensor(config):
var = cg.new_Pvariable(config[CONF_ID])
async def new_binary_sensor(config, *args):
var = cg.new_Pvariable(config[CONF_ID], *args)
await register_binary_sensor(var, config)
return var