diff --git a/rinkhals-webui/config.yaml b/rinkhals-webui/config.yaml
index 1ff9316..4ee1b7e 100644
--- a/rinkhals-webui/config.yaml
+++ b/rinkhals-webui/config.yaml
@@ -145,8 +145,14 @@ actions:
triggers:
- Refresh ACE status
- # - title: Toggle LED
- # icon:
+
+ - title: Turn LED on
+ icon:
+ shell: './scripts/set-led.sh 1'
+
+ - title: Turn LED off
+ icon:
+ shell: './scripts/set-led.sh 0'
- title: Refresh ACE status
icon:
@@ -226,6 +232,11 @@ dashboards:
- title: Stop drying {{ ace.action_marker }}
entity: ace
cssClass: 'if-enabled-{{ ace.is_drying }}'
+ - title: 'LED'
+ type: fieldset
+ contents:
+ - title: Turn LED on
+ - title: Turn LED off
- title: System
contents:
diff --git a/rinkhals-webui/lighttp-proxy.conf b/rinkhals-webui/lighttp-proxy.conf
new file mode 100644
index 0000000..e204fc9
--- /dev/null
+++ b/rinkhals-webui/lighttp-proxy.conf
@@ -0,0 +1,4 @@
+$HTTP["url"] =~ "^/(Apps|Control|System)" {
+ proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => 1414 ) ) )
+ proxy.header = ( "upgrade" => "enable" )
+}
diff --git a/rinkhals-webui/scripts/set-led.sh b/rinkhals-webui/scripts/set-led.sh
new file mode 100644
index 0000000..6fdaf84
--- /dev/null
+++ b/rinkhals-webui/scripts/set-led.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+STATE=$1
+if [ "$STATE" != "1" ]; then
+ STATE=0
+fi
+
+cd "$(dirname "$0")"
+./klippy-command.sh '{"method":"led/set_led","params":{"S":'$STATE'},"id":37}'