From 451093997d2915f8d12526d69d16c47c82a11bef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mario=20H=C3=B6llein?= Date: Sun, 24 Jun 2018 22:19:55 +0200 Subject: [PATCH] Weihnachtsbeleuchtung ein- oder ausschalten --- programme/Weihnachtsbeleuchtung.hm | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 programme/Weihnachtsbeleuchtung.hm diff --git a/programme/Weihnachtsbeleuchtung.hm b/programme/Weihnachtsbeleuchtung.hm new file mode 100644 index 0000000..e5e201c --- /dev/null +++ b/programme/Weihnachtsbeleuchtung.hm @@ -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); } + } +} + -- 2.43.0