reduce dim / off timeouts

main
Hendrik Sokolowski 2024-03-25 04:34:15 +01:00
parent b722e61369
commit 0af6422afd
1 changed files with 2 additions and 2 deletions

View File

@ -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