From: Mario Höllein Date: Sun, 24 Jun 2018 20:19:55 +0000 (+0200) Subject: Weihnachtsbeleuchtung ein- oder ausschalten X-Git-Url: https://git.hoellein.online/?a=commitdiff_plain;h=451093997d2915f8d12526d69d16c47c82a11bef;p=homematic Weihnachtsbeleuchtung ein- oder ausschalten --- 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); } + } +} +