mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Show box for Smartthings rise number entity (#141526)
This commit is contained in:
parent
6bfd39f094
commit
3a207e2571
@ -4,7 +4,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from pysmartthings import Attribute, Capability, Command, SmartThings
|
from pysmartthings import Attribute, Capability, Command, SmartThings
|
||||||
|
|
||||||
from homeassistant.components.number import NumberEntity
|
from homeassistant.components.number import NumberEntity, NumberMode
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
|
||||||
|
|
||||||
@ -32,6 +32,7 @@ class SmartThingsWasherRinseCyclesNumberEntity(SmartThingsEntity, NumberEntity):
|
|||||||
|
|
||||||
_attr_translation_key = "washer_rinse_cycles"
|
_attr_translation_key = "washer_rinse_cycles"
|
||||||
_attr_native_step = 1.0
|
_attr_native_step = 1.0
|
||||||
|
_attr_mode = NumberMode.BOX
|
||||||
|
|
||||||
def __init__(self, client: SmartThings, device: FullDevice) -> None:
|
def __init__(self, client: SmartThings, device: FullDevice) -> None:
|
||||||
"""Initialize the instance."""
|
"""Initialize the instance."""
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
'capabilities': dict({
|
'capabilities': dict({
|
||||||
'max': 5,
|
'max': 5,
|
||||||
'min': 0,
|
'min': 0,
|
||||||
'mode': <NumberMode.AUTO: 'auto'>,
|
'mode': <NumberMode.BOX: 'box'>,
|
||||||
'step': 1.0,
|
'step': 1.0,
|
||||||
}),
|
}),
|
||||||
'config_entry_id': <ANY>,
|
'config_entry_id': <ANY>,
|
||||||
@ -44,7 +44,7 @@
|
|||||||
'friendly_name': 'Washer Rinse cycles',
|
'friendly_name': 'Washer Rinse cycles',
|
||||||
'max': 5,
|
'max': 5,
|
||||||
'min': 0,
|
'min': 0,
|
||||||
'mode': <NumberMode.AUTO: 'auto'>,
|
'mode': <NumberMode.BOX: 'box'>,
|
||||||
'step': 1.0,
|
'step': 1.0,
|
||||||
'unit_of_measurement': 'cycles',
|
'unit_of_measurement': 'cycles',
|
||||||
}),
|
}),
|
||||||
@ -64,7 +64,7 @@
|
|||||||
'capabilities': dict({
|
'capabilities': dict({
|
||||||
'max': 5,
|
'max': 5,
|
||||||
'min': 0,
|
'min': 0,
|
||||||
'mode': <NumberMode.AUTO: 'auto'>,
|
'mode': <NumberMode.BOX: 'box'>,
|
||||||
'step': 1.0,
|
'step': 1.0,
|
||||||
}),
|
}),
|
||||||
'config_entry_id': <ANY>,
|
'config_entry_id': <ANY>,
|
||||||
@ -101,7 +101,7 @@
|
|||||||
'friendly_name': 'Washing Machine Rinse cycles',
|
'friendly_name': 'Washing Machine Rinse cycles',
|
||||||
'max': 5,
|
'max': 5,
|
||||||
'min': 0,
|
'min': 0,
|
||||||
'mode': <NumberMode.AUTO: 'auto'>,
|
'mode': <NumberMode.BOX: 'box'>,
|
||||||
'step': 1.0,
|
'step': 1.0,
|
||||||
'unit_of_measurement': 'cycles',
|
'unit_of_measurement': 'cycles',
|
||||||
}),
|
}),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user