ctucx.git: nixfiles

ctucx' nixfiles

commit 02a2dfa3cfaa4f3d9bd6c2b0e13fbbe2c326d656
parent ff4920d47471b1ab3b6a8e07d10d4bed998ef34f
Author: Leah (ctucx) <git@ctu.cx>
Date: Fri, 15 Dec 2023 16:28:13 +0100

machines/briefkasten/smarthome/mqtt-webui: update config
1 file changed, 26 insertions(+), 100 deletions(-)
M
machines/briefkasten/smarthome/mqtt-webui/config.nix
|
126
+++++++++++++++++--------------------------------------------------------------
diff --git a/machines/briefkasten/smarthome/mqtt-webui/config.nix b/machines/briefkasten/smarthome/mqtt-webui/config.nix
@@ -97,79 +97,10 @@ in {
       icon     = "favicon-512x512.png";
       title    = "Smart-Home";
       sections = [
-        {
-          title = "Rooms";
-          items = [
-            {
-              title = "Leah's room";
-              type = "text";
-              icon = "icons/electric_range.png";
-              link = "#leah";
-            }
-            {
-              title = "Isa's room";
-              type = "text";
-              icon = "icons/electric_range.png";
-              link = "#isa";
-            }
-          ];
-        }
-
-        (WhiteSpectrumLamp "Hallway: Ceiling Light" "zigbee2mqtt/ikea_lamp_hallway")
-
-        (WhiteSpectrumLamp "Kitchen: Ceiling Light" "zigbee2mqtt/ikea_lamp_kitchen")
-
-        (WhiteSpectrumLamp "Bathroom: Ceiling Light" "zigbee2mqtt/ikea_lamp_bathroom")
-
-       {
-          title = "Temperature-Sensors";
-          items = [
-            {
-              title     = "Fridge";
-              type      = "text";
-              topic     = "zigbee2mqtt/tuya_sensor_fridge";
-              icon      = "icons/temperature.png";
-              transform = "return Math.round((message.temperature + Number.EPSILON) * 100) / 100 + ' °C - ' + message.humidity + ' %'";
-            }
-            {
-              title     = "Bathroom";
-              type      = "text";
-              topic     = "zigbee2mqtt/tuya_sensor_bathroom";
-              icon      = "icons/temperature.png";
-              transform = "return Math.round((message.temperature + Number.EPSILON) * 100) / 100 + ' °C - ' + message.humidity + ' %'";
-            }
-          ];
-        }
-
-        {
-          items = [
-            {
-              title = "Departures";
-              type = "text";
-              icon = "icons/electric_range.png";
-              link = "#departures";
-            }
-            {
-              title = "Grafana-Dashboard";
-              type = "text";
-              icon = "icons/sun.png";
-              link = "https://grafana.ctu.cx/d/FRDYqjEGz/smarthome-influx?orgId=1&refresh=5s";
-            }
-          ];
-        }
-
-      ];
-    }
-
-    {
-      id       = "leah";
-      title    = "Leah's room";
-      sections = [
-        (WhiteSpectrumLamp "Ceiling Light" "zigbee2mqtt/ikea_lamp_l")
 
         (DimmableLamp "Desk" "zigbee2mqtt/tuya_led_stripe_desk")
 
-#        (ColorSpectrumLamp "RGB Lamp" "zigbee2mqtt/ikea_lamp_l_rgb")
+        (ColorSpectrumLamp "RGB Lamp" "zigbee2mqtt/ikea_lamp_l_rgb")
 
         {
           title = "Power-Meter";

@@ -218,11 +149,27 @@ in {
           ];
         }
 
+
         {
           title = "Temperature-Sensors";
           items = [
             {
-              title     = "Window";
+              title     = "Fridge";
+              type      = "text";
+              topic     = "zigbee2mqtt/tuya_sensor_fridge";
+              icon      = "icons/temperature.png";
+              transform = "return Math.round((message.temperature + Number.EPSILON) * 100) / 100 + ' °C - ' + message.humidity + ' %'";
+            }
+            {
+              title     = "Bathroom";
+              type      = "text";
+              topic     = "zigbee2mqtt/tuya_sensor_bathroom";
+              icon      = "icons/temperature.png";
+              transform = "return Math.round((message.temperature + Number.EPSILON) * 100) / 100 + ' °C - ' + message.humidity + ' %'";
+            }
+
+            {
+              title     = "Door";
               type      = "text";
               topic     = "zigbee2mqtt/tuya_sensor_l";
               icon      = "icons/temperature.png";

@@ -235,44 +182,23 @@ in {
               icon      = "icons/temperature.png";
               transform = "return Math.round((message.temperature + Number.EPSILON) * 100) / 100 + ' °C - ' + message.humidity + ' %'";
             }
-          ];
-        }
-
-      ];
-    }
 
-    {
-      id       = "isa";
-      title    = "Isa's room";
-      sections = [
-        (WhiteSpectrumLamp "Ceiling Light" "zigbee2mqtt/ikea_lamp_i")
-
-        (ColorSpectrumLamp "RGB Lamp" "zigbee2mqtt/ikea_lamp_i_rgb")
-
-        {
-          title = "Switches";
-          items = [
-            (Switch "Desk (L)" "zigbee2mqtt/ikea_control_outlet_i_desk_l")
-            (Switch "Desk (R)" "zigbee2mqtt/ikea_control_outlet_i_desk_r")
           ];
         }
 
         {
-          title = "Temperature-Sensors";
           items = [
             {
-              title     = "Temperature";
-              type      = "text";
-              topic     = "lacrosse2mqtt/3c";
-              icon      = "icons/temperature.png";
-              transform = "return Math.round((message.temperature + Number.EPSILON) * 100) / 100 + ' °C'";
+              title = "Departures";
+              type = "text";
+              icon = "icons/electric_range.png";
+              link = "#departures";
             }
             {
-              title     = "Humidity";
-              type      = "text";
-              topic     = "lacrosse2mqtt/3c";
-              icon      = "icons/thermostat.png";
-              transform = "return message.humidity + ' %'";
+              title = "Grafana-Dashboard";
+              type = "text";
+              icon = "icons/sun.png";
+              link = "https://grafana.ctu.cx/d/FRDYqjEGz/smarthome-influx?orgId=1&refresh=5s";
             }
           ];
         }