mirror of
https://github.com/esphome/esphome.git
synced 2026-09-11 23:37:34 +00:00
[select] Fix new_select() not forwarding constructor args while preserving keyword-only options parameter (#10036)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: clydebarrow <2366188+clydebarrow@users.noreply.github.com> Co-authored-by: jesserockz <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
co-authored by
clydebarrow
jesserockz
parent
bd2b3b9da5
commit
c308e03e92
@@ -118,8 +118,8 @@ async def register_select(var, config, *, options: list[str]):
|
||||
await setup_select_core_(var, config, options=options)
|
||||
|
||||
|
||||
async def new_select(config, *, options: list[str]):
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
async def new_select(config, *args, options: list[str]):
|
||||
var = cg.new_Pvariable(config[CONF_ID], *args)
|
||||
await register_select(var, config, options=options)
|
||||
return var
|
||||
|
||||
|
||||
Reference in New Issue
Block a user