ctucx.git: nixfiles

ctucx' nixfiles

commit 218815866eaa580ea7adbe729d83f03510e8450b
parent 798c390bc02233b002a383424491193e17061577
Author: Leah (ctucx) <leah@ctu.cx>
Date: Fri, 22 Jul 2022 19:47:51 +0200

machines/lollo/smarthome: add new remote
2 files changed, 54 insertions(+), 0 deletions(-)
M
machines/lollo/smarthome/smartied.nix
|
53
+++++++++++++++++++++++++++++++++++++++++++++++++++++
M
machines/lollo/smarthome/zigbee2mqtt.nix
|
1
+
diff --git a/machines/lollo/smarthome/smartied.nix b/machines/lollo/smarthome/smartied.nix
@@ -111,6 +111,59 @@ let
         };
       };
 
+      "tradfri-control-bed" = {
+        type       = "Zigbee2MqttRemote";
+        deviceName = "ikea_remote_l_bed";
+        actions    = {
+          toggle = [{
+            type       = "SwitchStateAction";
+            deviceName = "tradfri-lamp-l";
+            toggle     = true;
+          }];
+          arrow_right_click = [{
+            type       = "SwitchStateAction";
+            deviceName = "tradfri-co-l-bed";
+            toggle     = true;
+          }];
+          arrow_left_click = [{
+            type       = "SwitchStateAction";
+            deviceName = "modbus-20";
+            relay      = 0;
+            toggle     = true;
+          }];
+          brightness_up_click = [{
+            type       = "SwitchStateAction";
+            deviceName = "modbus-20";
+            relay      = 1;
+            toggle     = true;
+          }];
+          brightness_down_click = [
+            {
+              type       = "SwitchStateAction";
+              deviceName = "modbus-20";
+              relay      = 0;
+              state      = false;
+            }
+            {
+              type       = "SwitchStateAction";
+              deviceName = "modbus-20";
+              relay      = 1;
+              state      = false;
+            }
+            {
+              type       = "SwitchStateAction";
+              deviceName = "tradfri-co-l-bed";
+              state      = false;
+            }
+            {
+              type       = "SwitchStateAction";
+              deviceName = "tradfri-lamp-l";
+              state      = false;
+            }
+          ];
+        };
+      };
+
       "tradfri-motion-sensor" = {
         type          = "Zigbee2MqttMotionSensor";
         deviceName    = "ikea_motionsensor";
diff --git a/machines/lollo/smarthome/zigbee2mqtt.nix b/machines/lollo/smarthome/zigbee2mqtt.nix
@@ -73,6 +73,7 @@ in {
 
           "0x5c0272fffec9006c".friendly_name = "ikea_remote_i_door";
           "0x804b50fffe42a74e".friendly_name = "ikea_remote_l_door";
+          "0x842e14fffe977bfa".friendly_name = "ikea_remote_l_bed";
           "0x5c0272fffeca585a".friendly_name = "ikea_remote_kitchen_door";
           "0x842e14fffe1ab485".friendly_name = "ikea_remote_bathroom";
           "0x804b50fffe7df0be".friendly_name = "ikea_remote_hallway_entrancedoor";