mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-12-02 06:08:17 +00:00
bulb: add the temperature range to state_information, inform the user if the info is missing when calling temperature (#163)
This commit is contained in:
@@ -217,6 +217,9 @@ def temperature(dev, temperature):
|
||||
click.echo("Color temperature: %s" % dev.color_temp)
|
||||
if dev.valid_temperature_range != (0, 0):
|
||||
click.echo("(min: %s, max: %s)" % dev.valid_temperature_range)
|
||||
else:
|
||||
click.echo("Temperature range unknown, please open a github issue"
|
||||
" or a pull request for model '%s'" % dev.model)
|
||||
else:
|
||||
click.echo("Setting color temperature to %s" % temperature)
|
||||
dev.color_temp = temperature
|
||||
|
||||
Reference in New Issue
Block a user