Skip to content

Commit 07da802

Browse files
committed
Add constant for sleep times
1 parent 01d59cb commit 07da802

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

utils/measure/measure.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
SHELLY_IP = "192.168.178.254"
2828
HUE_BRIDGE_IP = "192.168.178.44"
2929
SLEEP_TIME = 2 # time between changing the light params and taking the measurement
30+
SLEEP_TIME_HUE = 5 # time to wait between each increase in hue
31+
SLEEP_TIME_SAT = 10 # time to wait between each increase in saturation
3032

3133
# Change this when the script crashes due to connectivity issues, so you don't have to start all over again
3234
START_BRIGHTNESS = 1
@@ -132,8 +134,9 @@ async def get_ct_variations(light: Light):
132134
async def get_hs_variations():
133135
for bri in inclusive_range(START_BRIGHTNESS, MAX_BRIGHTNESS, 10):
134136
for sat in inclusive_range(1, 254, 10):
135-
await asyncio.sleep(10)
137+
await asyncio.sleep(SLEEP_TIME_SAT)
136138
for hue in inclusive_range(1, 65535, 2000):
139+
await asyncio.sleep(SLEEP_TIME_HUE)
137140
yield {"bri": bri, "hue": hue, "sat": sat}
138141

139142

0 commit comments

Comments
 (0)