User Tools

Site Tools


tutorials:eventgroups

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tutorials:eventgroups [2017/12/11 19:24] – created James Sentmantutorials:eventgroups [2023/02/13 14:52] (current) – external edit 127.0.0.1
Line 13: Line 13:
 <code> <code>
  
-property:EventSuffix = “(HOLIDAY)”+property EventPrefix:“(HOLIDAY)”
  
 set eventList to all events set eventList to all events
  
 repeat with thisEvent in eventList repeat with thisEvent in eventList
-  if thisEvent begins with EventSuffix then+  if thisEvent begins with EventPrefix then
     unsuspend event thisEvent     unsuspend event thisEvent
   end if   end if
Line 28: Line 28:
  
 <code> <code>
-property:EventSuffix = “(HOLIDAY)”+property EventPrefix:“(HOLIDAY)”
  
 set eventList to all events set eventList to all events
  
 repeat with thisEvent in eventList repeat with thisEvent in eventList
-  if thisEvent begins with EventSuffix then+  if thisEvent begins with EventPrefix then
     suspend event thisEvent     suspend event thisEvent
   end if   end if
Line 41: Line 41:
 You can now create new or edit the Holiday events with the normal Edit Event window and control them all with that pseudo unit. Add it to a web remote list, or even create another scheduled event that turns it on and off at specific dates or times. You can create as many event groups as you wish this way. You can now create new or edit the Holiday events with the normal Edit Event window and control them all with that pseudo unit. Add it to a web remote list, or even create another scheduled event that turns it on and off at specific dates or times. You can create as many event groups as you wish this way.
  
-This has the additional value if giving you a pseudo you can check in other places in the code as well. If you have an (AWAY) pseudo then you can check for that in any other script and take different actions based on that. Perhaps you don’t care if there is motion in the front hall while you’re home but you would definitely want to get an [[tutorials:prowl|alert to your phone]] if it happened while you were away. You can check the state of that pseudo in any other place and take the appropriate action.+This has the additional value of giving you a pseudo you can check in other places in the code as well. If you have an (AWAY) pseudo then you can check for that in any other script and take different actions based on that. Perhaps you don’t care if there is motion in the front hall while you’re home but you would definitely want to get an [[tutorials:prowl|alert to your phone]] if it happened while you were away. You can check the state of that pseudo in any other place and take the appropriate action.
  
 You might want your MODE Away pseudo to be turned on when all your families [[tutorials:geofancy|phones leave the house]] and if so then it could also set back your thermostat and automatically enable those other events. You can add as many other actions or logic to the end of the units ON and OFF script that you wish. You might want your MODE Away pseudo to be turned on when all your families [[tutorials:geofancy|phones leave the house]] and if so then it could also set back your thermostat and automatically enable those other events. You can add as many other actions or logic to the end of the units ON and OFF script that you wish.
tutorials/eventgroups.1513020288.txt.gz · Last modified: 2023/02/13 14:51 (external edit)