mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 11:13:34 +00:00
Print formatting for IotLightPreset (#1216)
Now prints presets as such: ``` [0] Hue: 0 Saturation: 0 Brightness/Value: 100 Temp: 6000 Custom: None Mode: None Id: None [1] Hue: 0 Saturation: 0 Brightness/Value: 100 Temp: 2500 Custom: None Mode: None Id: None [2] Hue: 0 Saturation: 0 Brightness/Value: 60 Temp: 2500 Custom: None Mode: None Id: None [3] Hue: 240 Saturation: 100 Brightness/Value: 100 Temp: 0 Custom: None Mode: None Id: None ```
This commit is contained in:
parent
857a706649
commit
4e9a3e6b02
@ -130,8 +130,11 @@ def presets_list(dev: Device):
|
||||
error("Presets not supported on device")
|
||||
return
|
||||
|
||||
for preset in light_preset.preset_states_list:
|
||||
echo(preset)
|
||||
for idx, preset in enumerate(light_preset.preset_states_list):
|
||||
echo(
|
||||
f"[{idx}] Hue: {preset.hue:3} Saturation: {preset.saturation:3} "
|
||||
f"Brightness/Value: {preset.brightness:3} Temp: {preset.color_temp:4}"
|
||||
)
|
||||
|
||||
return light_preset.preset_states_list
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user