Use UnitOfTime constant in Gardena Bluetooth number (#187797)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Joost Lekkerkerker
2026-10-21 12:45:25 +02:00
committed by GitHub
co-authored by Claude
parent 948f324a4d
commit 712373c993
2 changed files with 2 additions and 2 deletions
@@ -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',