mirror of
https://github.com/home-assistant/core.git
synced 2026-12-05 13:21:11 -04:00
Use UnitOfTime constant in Gardena Bluetooth number (#187797)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
948f324a4d
commit
712373c993
@@ -199,7 +199,7 @@ class GardenaBluetoothRemainingOpenSetNumber(GardenaBluetoothEntity, NumberEntit
|
||||
"""Representation of a entity with remaining time."""
|
||||
|
||||
_attr_translation_key = "remaining_open_set"
|
||||
_attr_native_unit_of_measurement = "min"
|
||||
_attr_native_unit_of_measurement = UnitOfTime.MINUTES
|
||||
_attr_mode = NumberMode.BOX
|
||||
_attr_native_min_value = 0.0
|
||||
_attr_native_max_value = 24 * 60
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
<NumberEntityCapabilityAttribute.MIN: 'min'>: 0.0,
|
||||
<NumberEntityCapabilityAttribute.MODE: 'mode'>: <NumberMode.BOX: 'box'>,
|
||||
<NumberEntityCapabilityAttribute.STEP: 'step'>: 1.0,
|
||||
<EntityStateAttribute.UNIT_OF_MEASUREMENT: 'unit_of_measurement'>: 'min',
|
||||
<EntityStateAttribute.UNIT_OF_MEASUREMENT: 'unit_of_measurement'>: <UnitOfTime.MINUTES: 'min'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'number.mock_title_open_for',
|
||||
|
||||
Reference in New Issue
Block a user