From e21fbe28f12b3df62e1e61fea15fe1b189ab5a94 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 27 Jul 2023 23:18:45 +0200 Subject: expose thermal info via /thermal --- src/app.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/app.py b/src/app.py index 3964a38..274ff7b 100755 --- a/src/app.py +++ b/src/app.py @@ -585,6 +585,7 @@ def cgi_one_value(params, name, default=None): class Request(Enum): STATUS = 'status' TOP = 'top' + THERMAL = 'thermal' REBOOT = 'reboot' POWEROFF = 'poweroff' @@ -610,6 +611,8 @@ class Request(Enum): return Status().complete() if self is Request.TOP: return Top().complete() + if self is Request.THERMAL: + return ThermalInfo().complete() if self in [Request.REBOOT, Request.POWEROFF] and self.disable_power: return Response(None, HTTPStatus.FORBIDDEN) -- cgit v1.2.3