Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions kasa/iot/iotbulb.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,19 @@ async def _initialize_features(self):
)
)

if self.is_variable_color_temp:
self._add_feature(
Feature(
device=self,
name="Color temperature",
container=self,
attribute_getter="color_temp",
attribute_setter="set_color_temp",
range_getter="valid_temperature_range",
)
)


@property # type: ignore
@requires_update
def is_color(self) -> bool:
Expand Down
5 changes: 0 additions & 5 deletions kasa/tests/test_bulb.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,6 @@ async def test_variable_temp_state_information(dev: Bulb):
assert "Color temperature" in dev.state_information
assert dev.state_information["Color temperature"] == dev.color_temp

assert "Valid temperature range" in dev.state_information
assert (
dev.state_information["Valid temperature range"] == dev.valid_temperature_range
)


@variable_temp
@turn_on
Expand Down