File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
custom_components/smarter/helpers Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 1010from typing import Any
1111
1212from homeassistant .components .binary_sensor import BinarySensorEntityDescription
13- from homeassistant .components .number import NumberEntityDescription
13+ from homeassistant .components .number import NumberEntityDescription , NumberMode
1414from homeassistant .components .sensor import SensorEntityDescription
1515from homeassistant .components .switch import SwitchEntityDescription
1616from homeassistant .const import EntityCategory , Platform , UnitOfTemperature
@@ -374,6 +374,7 @@ def number_entity_description(self) -> NumberEntityDescription:
374374 key = self .key ,
375375 device_class = self .device_class ,
376376 entity_category = self .category ,
377+ mode = NumberMode .BOX if len (self ._mappings ) > 0 else NumberMode .SLIDER ,
377378 icon = self .icon ,
378379 translation_key = self .translation_key ,
379380 translation_placeholders = self .translation_placeholders ,
You can’t perform that action at this time.
0 commit comments