ctucx.git: nixfiles

ctucx' nixfiles

commit ff9848a312d58b2ad5895df94308d669b361ffb8
parent 218815866eaa580ea7adbe729d83f03510e8450b
Author: Leah (ctucx) <leah@ctu.cx>
Date: Tue, 26 Jul 2022 09:47:27 +0200

machines/lollo/smarthome/zgbee2mqtt: remove groups
2 files changed, 18 insertions(+), 72 deletions(-)
M
machines/lollo/smarthome/smartied.nix
|
25
+++++++++++++++----------
M
machines/lollo/smarthome/zigbee2mqtt.nix
|
65
+++--------------------------------------------------------------
diff --git a/machines/lollo/smarthome/smartied.nix b/machines/lollo/smarthome/smartied.nix
@@ -60,6 +60,12 @@ let
         deviceName = "ikea_lamp_i";
       };
 
+      "tradfri-lamp-i-rgb" = {
+        type       = "Zigbee2MqttLamp";
+        lampType   = "RGB";
+        deviceName = "ikea_lamp_i_rgb";
+      };
+
       "tradfri-lamp-hallway" = {
         type       = "Zigbee2MqttLamp";
         lampType   = "WhiteSpectrum";

@@ -78,12 +84,6 @@ let
         deviceName = "ikea_lamp_bathroom";
       };
 
-      "tradfri-lamp-i-rgb" = {
-        type       = "Zigbee2MqttLamp";
-        lampType   = "RGB";
-        deviceName = "ikea_lamp_i_rgb";
-      };
-
       "tradfri-co-l-bed" = {
         type       = "Zigbee2MqttRelay";
         deviceName = "ikea_control_outlet_l_bed";

@@ -99,19 +99,24 @@ let
         deviceName = "ikea_control_outlet_i_desk_r";
       };
 
-      "tradfri-button-l-desk" = {
+      "tradfri-remote-i-desk" = {
         type       = "Zigbee2MqttRemote";
-        deviceName = "ikea_button_l_desk";
+        deviceName = "ikea_remote_i_desk";
         actions    = {
           on = [{
             type       = "SwitchStateAction";
-            deviceName = "tradfri-co-l";
+            deviceName = "tradfri-co-i-desk-l";
+            toggle     = true;
+          }];
+          off = [{
+            type       = "SwitchStateAction";
+            deviceName = "tradfri-co-i-desk-r";
             toggle     = true;
           }];
         };
       };
 
-      "tradfri-control-bed" = {
+      "tradfri-remote-l-bed" = {
         type       = "Zigbee2MqttRemote";
         deviceName = "ikea_remote_l_bed";
         actions    = {
diff --git a/machines/lollo/smarthome/zigbee2mqtt.nix b/machines/lollo/smarthome/zigbee2mqtt.nix
@@ -65,87 +65,28 @@ in {
 
         devices = {
           "0x84fd27fffeaaa597".friendly_name = "ikea_lamp_i";
+          "0x842e14fffe57daae".friendly_name = "ikea_lamp_i_rgb";
           "0x84fd27fffe6b9ddd".friendly_name = "ikea_lamp_l";
           "0x84fd27fffe44369e".friendly_name = "ikea_lamp_kitchen";
           "0x84fd27fffe3a0b93".friendly_name = "ikea_lamp_bathroom";
           "0x84fd27fffea515fc".friendly_name = "ikea_lamp_hallway";
-          "0x842e14fffe57daae".friendly_name = "ikea_lamp_i_rgb";
 
           "0x5c0272fffec9006c".friendly_name = "ikea_remote_i_door";
+          "0x0c4314fffe194ca3".friendly_name = "ikea_remote_i_desk";
           "0x804b50fffe42a74e".friendly_name = "ikea_remote_l_door";
           "0x842e14fffe977bfa".friendly_name = "ikea_remote_l_bed";
-          "0x5c0272fffeca585a".friendly_name = "ikea_remote_kitchen_door";
+          "0x5c0272fffeca585a".friendly_name = "ikea_remote_kitchen";
           "0x842e14fffe1ab485".friendly_name = "ikea_remote_bathroom";
           "0x804b50fffe7df0be".friendly_name = "ikea_remote_hallway_entrancedoor";
           "0x0c4314fffe194a18".friendly_name = "ikea_remote_hallway";
-          "0x0c4314fffe194ca3".friendly_name = "ikea_remote_i_desk";
 
           "0xcc86ecfffe8bf621".friendly_name = "ikea_control_outlet_i_desk_r";
           "0x588e81fffebcdc1e".friendly_name = "ikea_control_outlet_i_desk_l";
-
           "0xec1bbdfffeca67bb".friendly_name = "ikea_control_outlet_l_bed";
 
           "0x847127fffecd89b6".friendly_name = "ikea_motionsensor";
         };
 
-        groups = {
-          "1" = {
-            friendly_name = "room_i";
-            retain        = false;
-            transition    = 2;
-            optimistic    = true;
-            devices = [
-              "ikea_lamp_i"
-              "ikea_lamp_i_rgb"
-            ];
-          };
-          "2" = {
-            friendly_name = "room_l";
-            retain        = false;
-            transition    = 2;
-            optimistic    = true;
-            devices = [
-              "ikea_lamp_l"
-            ];
-          };
-          "3" = {
-            friendly_name = "room_kitchen";
-            retain        = false;
-            transition    = 2;
-            optimistic    = true;
-            devices = [
-              "ikea_lamp_kitchen"
-            ];
-          };
-          "4" = {
-            friendly_name = "room_bathroom";
-            retain        = false;
-            transition    = 2;
-            optimistic    = true;
-            devices = [
-              "ikea_lamp_bathroom"
-            ];
-          };
-          "5" = {
-            friendly_name = "room_hallway";
-            retain        = false;
-            transition    = 2;
-            optimistic    = true;
-            devices = [
-              "ikea_lamp_hallway"
-            ];
-          };
-          "6" = {
-            friendly_name = "room_i_desk";
-            retain        = false;
-            transition    = 2;
-            optimistic    = true;
-            devices = [
-              "ikea_control_outlet_i_desk_r"
-              "ikea_control_outlet_i_desk_l"
-            ];
-          };
-        };
       };
     };
   };