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:
RoboMagus 2023-04-03 21:31:11 +02:00 committed by GitHub
parent 878155a03d
commit d78e9e6aa8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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