Is it possible to get the group name (hopefully I'm using the right name for it) from within a script?
Thanks
Thanks
If this is your first visit, be sure to check out the FAQ. You must register before you can post.
IMPORTANT: Your first post will be checked for appropriate content. This may take a bit of time.
Sub Main(ByVal Parms As Object) Dim EventGroup As String = "" Dim EventName As String = "" Try For Each evGroup As HomeSeerAPI.strEventGroupData In hs.Event_Group_Info_All EventGroup = evGroup.GroupName.ToString For Each eva As HomeSeerAPI.strEventData In hs.Event_Info_Group(evGroup.GroupID) EventName = eva.Event_Name.ToString If EventName = hs.GetLastEvent Then Exit Try Next Next Catch End Try hs.writelog("EventGroup", EventGroup) hs.writelog("EventName", EventName) End Sub
Sub Main(ByVal Parms As Object) Dim EventGroup As String = "" Dim EventName As String = "" Dim LastEvent As String = hs.GetLastEvent Try For Each evGroup As HomeSeerAPI.strEventGroupData In hs.Event_Group_Info_All EventGroup = evGroup.GroupName.ToString For Each eva As HomeSeerAPI.strEventData In hs.Event_Info_Group(evGroup.GroupID) EventName = eva.Event_Name.ToString If EventName = LastEvent Then Exit Try Next Next Catch End Try hs.writelog("EventGroup", EventGroup) hs.writelog("EventName", EventName) End Sub
Comment