mirror of
https://github.com/esphome/esphome.git
synced 2024-11-28 17:54:13 +01:00
Number step not optional (#4649)
* Number step not optional * Update __init__.py * Update __init__.py --------- Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
parent
878155a03d
commit
d78e9e6aa8
1 changed files with 1 additions and 4 deletions
|
@ -1,4 +1,3 @@
|
|||
from typing import Optional
|
||||
import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
from esphome import automation
|
||||
|
@ -252,9 +251,7 @@ async def register_number(
|
|||
)
|
||||
|
||||
|
||||
async def new_number(
|
||||
config, *, min_value: float, max_value: float, step: Optional[float] = None
|
||||
):
|
||||
async def new_number(config, *, min_value: float, max_value: float, step: float):
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
await register_number(
|
||||
var, config, min_value=min_value, max_value=max_value, step=step
|
||||
|
|
Loading…
Reference in a new issue