Skip to content

Commit

Permalink
Add KL135 color temperature range (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
rytilahti committed Nov 19, 2021
1 parent 351e86b commit a468d52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ or the `parse_pcap.py` script contained inside the `devtools` directory.
* KL120
* KL125
* KL130
* KL135

### Light strips

Expand Down
1 change: 1 addition & 0 deletions kasa/smartbulb.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class HSV(NamedTuple):
"KB130": ColorTempRange(2500, 9000),
"KL130": ColorTempRange(2500, 9000),
"KL125": ColorTempRange(2500, 6500),
"KL135": ColorTempRange(2500, 6500),
r"KL120\(EU\)": ColorTempRange(2700, 6500),
r"KL120\(US\)": ColorTempRange(2700, 5000),
r"KL430": ColorTempRange(2500, 9000),
Expand Down

4 comments on commit a468d52

@Valdorama
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I stumbled upon this commit when trying to troubleshoot lots of warning messages in Home Assistant about 'Unknown color temperature range, fallback to 2700-5000'. Looking at the source code and this commit, it looks like in my case the problem is that my KL135 bulb has a model number: "KL135(US)".

I see that some other bulbs have this region suffix so does that mean an entry is required for 'KL135(US)'?

@rytilahti
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The region suffix is only necessary for devices that have different color temperature settings on different markets, but the problem you are seeing will go away as soon as new python-kasa gets released and homeassistant gets a version bump.

If you want to fix it locally until that happens (there hasn't been enough interest nor changes to warrant a new release), simply add that single line to your local smartbulb.py and you'll get colder color temperatures and less warnings :-)

@Valdorama
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the response, just getting back to this now. I notice that the affected file is located inside my Home Assistant container. I can go ahead and change it for now in there, but does that mean the change will be overwritten every time I update my Home Assistant container?

@rytilahti
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, until a new python-kasa gets released and the homeassistant dependency gets bumped.

Please sign in to comment.