Pass through additional arguments to create number (#5849)

This commit is contained in:
Clyde Stubbs 2023-11-28 14:50:02 +11:00 committed by GitHub
parent 1e77271858
commit a8bc5ef46f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -257,8 +257,8 @@ async def register_number(
) )
async def new_number(config, *, min_value: float, max_value: float, step: float): async def new_number(config, *args, min_value: float, max_value: float, step: float):
var = cg.new_Pvariable(config[CONF_ID]) var = cg.new_Pvariable(config[CONF_ID], *args)
await register_number( await register_number(
var, config, min_value=min_value, max_value=max_value, step=step var, config, min_value=min_value, max_value=max_value, step=step
) )