Migrate number mode to StrEnum (#60614)

This commit is contained in:
Franck Nijhof
2021-11-30 12:54:06 +01:00
committed by GitHub
parent 1b8eba0afd
commit 7469f083fd
6 changed files with 32 additions and 29 deletions

View File

@@ -7,10 +7,6 @@ ATTR_MIN = "min"
ATTR_MAX = "max"
ATTR_STEP = "step"
MODE_AUTO: Final = "auto"
MODE_BOX: Final = "box"
MODE_SLIDER: Final = "slider"
DEFAULT_MIN_VALUE = 0.0
DEFAULT_MAX_VALUE = 100.0
DEFAULT_STEP = 1.0
@@ -18,3 +14,8 @@ DEFAULT_STEP = 1.0
DOMAIN = "number"
SERVICE_SET_VALUE = "set_value"
# MODE_* are deprecated as of 2021.12, use the NumberMode enum instead.
MODE_AUTO: Final = "auto"
MODE_BOX: Final = "box"
MODE_SLIDER: Final = "slider"