reduce dim / off timeouts
parent
b722e61369
commit
0af6422afd
|
@ -40,11 +40,11 @@ class InputListener():
|
|||
async def brightness_loop(self, logger):
|
||||
logger.info('starting brightess loop')
|
||||
while True:
|
||||
if self.last_input + 60 < time.time():
|
||||
if self.last_input + 30 < time.time():
|
||||
if self.brightness_mode != BrightnessMode.MODE_OFF:
|
||||
await asyncio.create_subprocess_exec('brightnessctl', 'set', '0', stdout=asyncio.subprocess.DEVNULL, stderr=asyncio.subprocess.DEVNULL)
|
||||
self.brightness_mode = BrightnessMode.MODE_OFF
|
||||
elif self.last_input + 30 < time.time():
|
||||
elif self.last_input + 15 < time.time():
|
||||
if self.brightness_mode != BrightnessMode.MODE_DIM:
|
||||
await asyncio.create_subprocess_exec('brightnessctl', 'set', '5%', stdout=asyncio.subprocess.DEVNULL, stderr=asyncio.subprocess.DEVNULL)
|
||||
self.brightness_mode = BrightnessMode.MODE_DIM
|
||||
|
|
Loading…
Reference in New Issue