From fc8116760f7e914da7cc153a09c9637ba6df8e52 Mon Sep 17 00:00:00 2001 From: Nicholas Pease Date: Mon, 4 Jan 2021 21:52:33 -0500 Subject: [PATCH] Required Fix --- python/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/api.py b/python/api.py index cf9ae8b..492fa41 100644 --- a/python/api.py +++ b/python/api.py @@ -8,7 +8,7 @@ def brightness(): if request.method == 'POST': json = request.get_json() if json['level'] < 255 and json['level'] > 15: - status = os.popen('echo '+int(json['level'])+' > /sys/class/backlight/rpi_backlight/brightness').read() + status = os.popen('echo '+str(json['level'])+' > /sys/class/backlight/rpi_backlight/brightness').read() elif json['level'] == 256: status = os.popen('sudo cat /sys/class/backlight/rpi_backlight/brightness').read() return status