mirror of
https://github.com/home-assistant/core.git
synced 2025-11-14 05:20:17 +00:00
Fix min and max mireds with HKC (#75744)
This commit is contained in:
@@ -71,6 +71,18 @@ class HomeKitLight(HomeKitEntity, LightEntity):
|
||||
self.service.value(CharacteristicsTypes.SATURATION),
|
||||
)
|
||||
|
||||
@property
|
||||
def min_mireds(self) -> int:
|
||||
"""Return minimum supported color temperature."""
|
||||
min_value = self.service[CharacteristicsTypes.COLOR_TEMPERATURE].minValue
|
||||
return int(min_value) if min_value else super().min_mireds
|
||||
|
||||
@property
|
||||
def max_mireds(self) -> int:
|
||||
"""Return the maximum color temperature."""
|
||||
max_value = self.service[CharacteristicsTypes.COLOR_TEMPERATURE].maxValue
|
||||
return int(max_value) if max_value else super().max_mireds
|
||||
|
||||
@property
|
||||
def color_temp(self) -> int:
|
||||
"""Return the color temperature."""
|
||||
|
||||
Reference in New Issue
Block a user