Migrate number mode to StrEnum (#60614)
This commit is contained in:
parent
1b8eba0afd
commit
7469f083fd
6 changed files with 32 additions and 29 deletions
|
@ -4,8 +4,7 @@ from __future__ import annotations
|
|||
from typing import cast
|
||||
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.components.number import NumberEntity
|
||||
from homeassistant.components.number.const import MODE_SLIDER
|
||||
from homeassistant.components.number import NumberEntity, NumberMode
|
||||
from homeassistant.const import CONF_NAME
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
|
@ -47,7 +46,7 @@ class FluxNumber(FluxEntity, CoordinatorEntity, NumberEntity):
|
|||
_attr_min_value = 1
|
||||
_attr_max_value = 100
|
||||
_attr_step = 1
|
||||
_attr_mode = MODE_SLIDER
|
||||
_attr_mode = NumberMode.SLIDER
|
||||
_attr_icon = "mdi:speedometer"
|
||||
|
||||
def __init__(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue