]> git.hoellein.online Git - homematic/commitdiff
Weihnachtsbeleuchtung ein- oder ausschalten
authorMario Höllein <mhoellein@freenet.de>
Sun, 24 Jun 2018 20:19:55 +0000 (22:19 +0200)
committerMario Höllein <mhoellein@freenet.de>
Sun, 24 Jun 2018 20:19:55 +0000 (22:19 +0200)
programme/Weihnachtsbeleuchtung.hm [new file with mode: 0644]

diff --git a/programme/Weihnachtsbeleuchtung.hm b/programme/Weihnachtsbeleuchtung.hm
new file mode 100644 (file)
index 0000000..e5e201c
--- /dev/null
@@ -0,0 +1,37 @@
+!Alle Schaltaktoren müssen im Gewerk "Weihnachtsbeleuchtung" sein
+!Diese werden dann ein-/aus-geschaltet geschaltet
+
+!einschalten
+var myAssembly = dom.GetObject("Weihnachtsbeleuchtung");
+string itemID;
+foreach(itemID, myAssembly.EnumUsedIDs()) {
+ var item = dom.GetObject(itemID);
+ if (item.IsTypeOf(OT_CHANNEL)) {
+  var device = dom.GetObject(item.Device());
+  if (device.HssType() == "HM-LC-Sw1-Pl") { item.State(1); }
+  if (device.HssType() == "HM-LC-Sw1-FM") { item.State(1); }
+  if (device.HssType() == "HM-LC-Sw2-FM") { item.State(1); }
+  if (device.HssType() == "HM-LC-Sw1-PB-FM") { item.State(1); }
+  if (device.HssType() == "HM-LC-Sw2-PB-FM") { item.State(1); }
+  if (device.HssType() == "HM-LC-Dim1L-Pl") { item.State(1.00); }
+  if (device.HssType() == "HM-LC-Dim1L-CV") {item.State(1.00); }
+ }
+}
+
+!ausschalten
+var myAssembly = dom.GetObject("Weihnachtsbeleuchtung");
+string itemID;
+foreach(itemID, myAssembly.EnumUsedIDs()) {
+ var item = dom.GetObject(itemID);
+ if (item.IsTypeOf(OT_CHANNEL)) {
+  var device = dom.GetObject(item.Device());
+  if (device.HssType() == "HM-LC-Sw1-Pl") { item.State(1); }
+  if (device.HssType() == "HM-LC-Sw1-FM") { item.State(1); }
+  if (device.HssType() == "HM-LC-Sw2-FM") { item.State(1); }
+  if (device.HssType() == "HM-LC-Sw1-PB-FM") { item.State(1); }
+  if (device.HssType() == "HM-LC-Sw2-PB-FM") { item.State(1); }
+  if (device.HssType() == "HM-LC-Dim1L-Pl") { item.State(1.00); }
+  if (device.HssType() == "HM-LC-Dim1L-CV") {item.State(1.00); }
+ }
+}
+