mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix yeelight color temp getter (#24830)
* Fix yeelight color temp getter * Remove wrong types
This commit is contained in:
parent
cde855f67d
commit
b70f907d25
@ -277,10 +277,10 @@ class YeelightGenericLight(Light):
|
|||||||
@property
|
@property
|
||||||
def color_temp(self) -> int:
|
def color_temp(self) -> int:
|
||||||
"""Return the color temperature."""
|
"""Return the color temperature."""
|
||||||
temp = self._get_property('ct')
|
temp_in_k = self._get_property('ct')
|
||||||
if temp:
|
if temp_in_k:
|
||||||
self._color_temp = temp
|
self._color_temp = kelvin_to_mired(int(temp_in_k))
|
||||||
return kelvin_to_mired(int(self._color_temp))
|
return self._color_temp
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self) -> str:
|
def name(self) -> str:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user