Show box for Smartthings rise number entity (#141526)

This commit is contained in:
Robert Resch 2025-03-26 22:03:24 +01:00 committed by Franck Nijhof
parent 25b45ce867
commit 35bcc9d5af
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
2 changed files with 6 additions and 5 deletions

View File

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

View File

@ -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',
}), }),